Table of Contents
Fetching ...

The Curious Case of Analogies: Investigating Analogical Reasoning in Large Language Models

Taewhoo Lee, Minju Song, Chanwoong Yoon, Jungwoo Park, Jaewoo Kang

TL;DR

The paper investigates whether large language models encode and apply high level relational concepts using proportional and story analogies. It employs mechanistic interpretability tools such as attention knockout, Patchscopes, and linear probing, along with a new Mutual Alignment Score metric, to reveal where relational information is stored and how it is propagated. Key findings include that relational information is encoded in mid upper layers and that transferring this information to downstream positions is a bottleneck, though targeted interventions can recover a substantial fraction of correct behavior; structural alignment between source and target narratives also predicts success. The work highlights both parallels with human relational reasoning and gaps in transfer and alignment, providing a roadmap for improving analogical reasoning in LLMs with targeted internal interventions and representation steering.

Abstract

Analogical reasoning is at the core of human cognition, serving as an important foundation for a variety of intellectual activities. While prior work has shown that LLMs can represent task patterns and surface-level concepts, it remains unclear whether these models can encode high-level relational concepts and apply them to novel situations through structured comparisons. In this work, we explore this fundamental aspect using proportional and story analogies, and identify three key findings. First, LLMs effectively encode the underlying relationships between analogous entities; both attributive and relational information propagate through mid-upper layers in correct cases, whereas reasoning failures reflect missing relational information within these layers. Second, unlike humans, LLMs often struggle not only when relational information is missing, but also when attempting to apply it to new entities. In such cases, strategically patching hidden representations at critical token positions can facilitate information transfer to a certain extent. Lastly, successful analogical reasoning in LLMs is marked by strong structural alignment between analogous situations, whereas failures often reflect degraded or misplaced alignment. Overall, our findings reveal that LLMs exhibit emerging but limited capabilities in encoding and applying high-level relational concepts, highlighting both parallels and gaps with human cognition.

The Curious Case of Analogies: Investigating Analogical Reasoning in Large Language Models

TL;DR

The paper investigates whether large language models encode and apply high level relational concepts using proportional and story analogies. It employs mechanistic interpretability tools such as attention knockout, Patchscopes, and linear probing, along with a new Mutual Alignment Score metric, to reveal where relational information is stored and how it is propagated. Key findings include that relational information is encoded in mid upper layers and that transferring this information to downstream positions is a bottleneck, though targeted interventions can recover a substantial fraction of correct behavior; structural alignment between source and target narratives also predicts success. The work highlights both parallels with human relational reasoning and gaps in transfer and alignment, providing a roadmap for improving analogical reasoning in LLMs with targeted internal interventions and representation steering.

Abstract

Analogical reasoning is at the core of human cognition, serving as an important foundation for a variety of intellectual activities. While prior work has shown that LLMs can represent task patterns and surface-level concepts, it remains unclear whether these models can encode high-level relational concepts and apply them to novel situations through structured comparisons. In this work, we explore this fundamental aspect using proportional and story analogies, and identify three key findings. First, LLMs effectively encode the underlying relationships between analogous entities; both attributive and relational information propagate through mid-upper layers in correct cases, whereas reasoning failures reflect missing relational information within these layers. Second, unlike humans, LLMs often struggle not only when relational information is missing, but also when attempting to apply it to new entities. In such cases, strategically patching hidden representations at critical token positions can facilitate information transfer to a certain extent. Lastly, successful analogical reasoning in LLMs is marked by strong structural alignment between analogous situations, whereas failures often reflect degraded or misplaced alignment. Overall, our findings reveal that LLMs exhibit emerging but limited capabilities in encoding and applying high-level relational concepts, highlighting both parallels and gaps with human cognition.

Paper Structure

This paper contains 27 sections, 13 figures, 6 tables, 1 algorithm.

Figures (13)

  • Figure 1: An overview of the mechanism behind analogical reasoning in LLMs. (A) LLMs effectively encode relational information and apply it during correct analogical reasoning, but applying the relation often remains as much a bottleneck as encoding it. (B) Identifying analogous situations is strongly associated with structural alignment, which we quantify using the Mutual Alignment Score (MAS).
  • Figure 2: Results of applying attention knockout to different positions on Qwen2.5-14B. Mid-upper layers of $e_2$ and $e_3$ are critical for answer resolution in both correct and incorrect cases. In incorrect cases, information from the link strongly influences model output, suggesting that the link may contribute to reasoning failures.
  • Figure 3: Proportion of cases where relational or attributive information is successfully decoded using Patchscopes. Attributive information persists across mid-upper layers regardless of correctness, while relational information shows a sharp decline in incorrect cases. This underscores the critical role of relational information in accurate answer resolution.
  • Figure 4: Linear probe accuracy across layers. High accuracy in the middle layers indicates the internal representation of analogical structure in these regions.
  • Figure 5: Relative Mutual Alignment Score (MAS) across layers, computed as the difference between the MAS of source-target pairs and source-distractor pairs.
  • ...and 8 more figures