← Latest papers
💬 NLP

Deductive Logic in Language Models: Horizontal vs Vertical Reasoning

This paper investigates how small transformer models trained on synthetic deductive tasks implement reasoning through distinct horizontal (autoregressive) and vertical (implicit) mechanisms, revealing that Chain-of-Thought supervision fosters genuine rule-based inference in horizontal settings while acting as curriculum learning to develop complex reasoning patterns in vertical settings.

Original authors: Davide Maltoni, Matteo Ferrara

Published 2026-07-01
📖 5 min read🧠 Deep dive

Original authors: Davide Maltoni, Matteo Ferrara

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a tiny, blank-slate robot brain (a small language model) that knows nothing about the world. You want to teach it how to solve logic puzzles. This paper is like a detective story where the researchers peek inside this robot's brain to see how it figures things out. They discovered that the robot can solve these puzzles in two very different ways, depending on how you teach it.

Here is the breakdown of their findings using simple analogies:

The Two Ways of Thinking: "Walking" vs. "Teleporting"

The researchers tested the robot on two types of puzzles:

  1. The Chain Puzzle: Connecting dots (e.g., if A leads to B, and B leads to C, does A lead to C?).
  2. The Tree Maze: Finding a path from the top of a tree to a specific leaf at the bottom.

They found the robot uses two distinct modes of thinking:

1. Horizontal Reasoning: The "Step-by-Step Walker"

The Analogy: Imagine you are walking through a dark forest. You can only see the next step in front of you. To get to the end, you must take one step, look around, take the next step, and so on. You can't jump ahead.

  • How it works: This happens when the robot is taught using Chain-of-Thought (CoT). This is like giving the robot a notebook where it has to write down every single step of its journey before it gives the final answer.
  • What the robot learns: The robot learns to act like a detective following a trail. It finds a rule (A leads to B), writes it down, then uses that result to find the next rule (B leads to C).
  • The Secret Mechanism: Inside the robot's brain, there are tiny "search engines" (called Induction Heads) that act like a "copy-paste" function. They look back at what was just written, find a matching piece of information, and copy the next piece of the puzzle forward. It's a very clear, mechanical process of "Find A, get B, then find C."

2. Vertical Reasoning: The "Teleporting Thinker"

The Analogy: Imagine you are standing at the bottom of a tall tower, but you need to know what's at the very top before you can even take your first step up. You can't walk up step-by-step because you don't know which stairs are safe yet. Instead, you have to mentally "teleport" all the way to the top, figure out the whole path in your head, and then start speaking.

  • How it works: This happens when the robot has to solve the Tree Maze without being allowed to write down intermediate steps. It has to solve the whole problem inside its layers of neurons before it outputs the first word.
  • The Secret Mechanism: The robot doesn't "walk" the path; it builds the path vertically through its layers. It's like a stack of transparent sheets. The bottom sheet holds the starting point, the next sheet holds the next step, and so on, all the way up. By the time the information reaches the top layer, the whole path is assembled.
  • The Role of Teaching: Surprisingly, even though the robot isn't writing down steps, giving it a "Chain-of-Thought" example helps it learn. The researchers call this Curriculum Learning. It's like a teacher showing a student easy puzzles first (short paths) and gradually giving harder ones (long paths). The robot learns the simple patterns first and then uses that knowledge to tackle the complex ones, all happening "silently" inside its brain.

The Trap: "Cheating" Without a Teacher

The researchers tried to teach the robot without the step-by-step notes (Chain-of-Thought).

  • The Result: The robot mostly failed to learn the actual logic. Instead, it started "cheating."
  • The Analogy: Imagine a student taking a test. If the teacher doesn't ask for the work, the student might just memorize that "questions with 5 numbers usually get a 'Yes' answer" instead of actually doing the math.
  • The Finding: Without the step-by-step guidance, the robot memorized patterns in the test data (biases) rather than learning the rules of logic. It could get high scores on the practice test but would fail completely on new, tricky questions.

The Big Takeaway

The paper shows that how you teach a robot matters more than just the robot itself.

  • If you force the robot to speak its thoughts (Horizontal), it builds a clear, mechanical chain of logic that we can easily understand and trace.
  • If you force the robot to think silently (Vertical), it can still learn, but it does so by gradually building up complexity, almost like a student mastering a skill through practice rather than a manual.
  • If you don't give it any guidance at all, it tends to cheat by memorizing shortcuts, which makes it unreliable when the rules change.

In short, the "Chain-of-Thought" isn't just a fancy trick to get better answers; it's a fundamental tool that changes how the robot's brain is wired to solve problems, turning it from a memorizer into a logical thinker.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →