pith. sign in

arxiv: 2506.04289 · v3 · submitted 2025-06-04 · 💻 cs.LG · q-bio.NC

Relational reasoning and inductive bias in transformers and large language models

Pith reviewed 2026-05-19 11:26 UTC · model grok-4.3

classification 💻 cs.LG q-bio.NC
keywords transitive inferencetransformersin-weights learningin-context learningrelational reasoninglarge language modelsgeneralization
0
0 comments X

The pith

Transformers perform transitive inference through linear embeddings from in-weights learning, with in-context learning requiring specific pretraining to do the same.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

This paper examines how transformer-based models carry out transitive inference, the ability to deduce indirect relations from direct ones. It reveals that in-weights learning produces linear embeddings enabling consistent transitive reasoning similar to that seen in humans and animals. In-context learning models, however, default to a match-and-copy approach unless the training data requires building a linear representation, in which case they align with in-weights models. Tests on large language models using a congruency paradigm confirm that in-weights style reasoning yields more transitive generalization, and prompting for linear mental maps boosts this further. These findings highlight how training methods and internal representation geometry shape relational reasoning capabilities in AI systems.

Core claim

In-weights learning induces linear embeddings in transformers that support transitive inference and related behavioral effects. In-context learning supports transitive generalization only when necessitated by the training data, otherwise relying on match-and-copy strategies. Pre-training in-context models on in-context linear regression tasks produces behaviors and representations qualitatively and quantitatively similar to in-weights learning. In large language models, a congruency paradigm shows greater transitive generalization for in-weights-like patterns, with linear prompts increasing transitive inference across different geometric cues.

What carries the argument

The geometric structure of induced representations, specifically linear embeddings versus match-and-copy strategies, that determines transitive inference capacity under different training regimes.

If this is right

  • IWL models learn a linear embedding leading to transitive inference and human-like effects.
  • ICL models learn to generalize transitively only when required by training data, otherwise using match-and-copy.
  • Pre-training ICL models on in-context linear regression aligns their behaviors and representations with IWL.
  • The congruency paradigm distinguishes IWL and ICL patterns in LLMs without access to training data.
  • Prompting ICL models to use a linear mental map increases transitive inference over other geometric prompts.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • Designing training regimes to encourage linear geometric structures may improve relational reasoning in a variety of models.
  • Prompt engineering that induces linear mental maps could be a practical way to enhance inference in deployed LLMs.
  • The congruency paradigm offers a tool for probing internal mechanisms in black-box models on other reasoning tasks.
  • These results suggest that representation geometry, not just scale, is a critical factor for cognitive-like behaviors in AI.

Load-bearing premise

The congruency paradigm can reliably distinguish IWL-style versus ICL-style generalization patterns in large language models even without any access to their original training data or weights.

What would settle it

If pre-training ICL models on in-context linear regression tasks does not produce internal representations and behaviors more similar to IWL models, this would challenge the claim that such pretraining is sufficient to align the two.

Figures

Figures reproduced from arXiv: 2506.04289 by Andrew Liu, Claudia Clopath, Jesse Geerts, Kimberly Stachenfeld, Stephanie Chan.

Figure 1
Figure 1. Figure 1: (A) Transitive inference setup with Omniglot images. First row shows an example hierarchy. [PITH_FULL_IMAGE:figures/full_fig_p002_1.png] view at source ↗
Figure 2
Figure 2. Figure 2: In-weights learning experiments. (A) Training and evaluation setup: the hierarchy is fixed [PITH_FULL_IMAGE:figures/full_fig_p004_2.png] view at source ↗
Figure 3
Figure 3. Figure 3: In-context learning experiments. (A) Training and evaluation setup. (B) Training loss. [PITH_FULL_IMAGE:figures/full_fig_p005_3.png] view at source ↗
Figure 4
Figure 4. Figure 4: (A) Layer 1 attention pattern during the in-context TI task. (B) Induction strength of each [PITH_FULL_IMAGE:figures/full_fig_p006_4.png] view at source ↗
Figure 5
Figure 5. Figure 5: (A) Pre-training setup for in-context linear regression (evaluation setup was same as in [PITH_FULL_IMAGE:figures/full_fig_p008_5.png] view at source ↗
Figure 6
Figure 6. Figure 6: Reproducibility across multiple runs. Performance on transitive inference task across 10 [PITH_FULL_IMAGE:figures/full_fig_p013_6.png] view at source ↗
read the original abstract

Transformer-based models have demonstrated remarkable reasoning abilities, but the mechanisms underlying relational reasoning remain poorly understood. We investigate how transformers perform \textit{transitive inference}, a classic relational reasoning behavior from psychology which elicits inference about indirectly related items (e.g., if $A > B$ and $B > C$, then $A > C$). We compare in-weights learning (IWL) and in-context learning (ICL) behaviors and mechanisms on these tasks, and fine profoundly different patterns of generalization. IWL models learn a linear embedding, which leads to transitive inference as well as other behavioral effects present in humans and animals. ICL models, in contrast, are capable of learning to generalize transitively, but only do so when it is necessitated by the training data, otherwise learning a match-and-copy strategy. Interestingly, pre-training ICL models on in-context linear regression tasks that provide them with a latent linear representation is sufficient to make the ICL behaviors and internal representations qualitatively and quantitatively more like IWL. In order to test whether the same inference patterns are present across in large language models, we leverage a congruency paradigm which allows us to differentially probe IWL and ICL generalization patterns without access to their training data. We indeed see IWL reasoning leads to more transitive generalization than ICL. Moreover, we find that prompting the ICL models to use a linear mental map led to increased transitive inference over different geometric prompts. Together, these results reveal that both the training regime and the geometric structure of induced representations critically determine transformers capacity for transitive inference.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

2 major / 2 minor

Summary. The paper investigates transitive inference in transformers by contrasting in-weights learning (IWL) and in-context learning (ICL) regimes. Controlled experiments show IWL models induce linear embeddings that support transitive generalization and human-like behavioral effects, while ICL models default to match-and-copy strategies unless the training data forces transitive inference. Pre-training ICL models on in-context linear regression tasks produces representations and behaviors more similar to IWL. The authors then apply a congruency paradigm to black-box LLMs to probe the same distinction without access to weights or training data, reporting that IWL-style reasoning yields more transitive inference and that linear mental-map prompts increase it relative to other geometric prompts. The central claim is that both training regime and the geometric structure of induced representations determine a transformer's capacity for transitive inference.

Significance. If the congruency paradigm is shown to map onto the internal mechanisms identified in the small-model experiments, the work would usefully link inductive biases from training regime to geometric properties of representations and to relational reasoning performance. The controlled IWL/ICL comparisons and the demonstration that linear-regression pre-training can shift ICL behavior toward IWL-like transitive inference constitute concrete, reproducible empirical contributions that could inform future architecture and training choices for relational tasks.

major comments (2)
  1. [LLM experiments / congruency paradigm section] The extension of the central claim to LLMs rests on the congruency paradigm's ability to isolate IWL-style (linear-embedding, transitive) versus ICL-style (match-and-copy) generalization from behavioral probes alone. The manuscript does not report applying the same paradigm to the small transformer models whose internal representations and training regimes are directly observable; without this cross-validation, it remains possible that the LLM results reflect prompt-sensitive output heuristics rather than the geometric structures characterized in the controlled experiments. This is load-bearing for the claim that the same factors operate at scale.
  2. [Methods / ICL training regime] The abstract and results state that ICL models generalize transitively 'only when it is necessitated by the training data.' The precise data-generation procedure, the fraction of transitive versus non-transitive examples, and the statistical criteria used to classify a model as exhibiting transitive inference versus match-and-copy are not specified with sufficient detail to allow independent replication or to rule out post-hoc selection of thresholds.
minor comments (2)
  1. Notation for the congruency conditions (e.g., what constitutes a 'linear mental map' prompt versus other geometric prompts) should be defined explicitly with example prompts in a table or appendix.
  2. The paper would benefit from reporting effect sizes and confidence intervals alongside accuracy or inference rates in all behavioral figures, rather than relying solely on qualitative descriptions of 'more transitive generalization.'

Simulated Author's Rebuttal

2 responses · 0 unresolved

We thank the referee for their constructive and positive assessment of our work. We appreciate the recognition of the controlled IWL/ICL comparisons and the potential implications of the findings. We address each major comment below and have revised the manuscript accordingly to strengthen the presentation and replicability.

read point-by-point responses
  1. Referee: [LLM experiments / congruency paradigm section] The extension of the central claim to LLMs rests on the congruency paradigm's ability to isolate IWL-style (linear-embedding, transitive) versus ICL-style (match-and-copy) generalization from behavioral probes alone. The manuscript does not report applying the same paradigm to the small transformer models whose internal representations and training regimes are directly observable; without this cross-validation, it remains possible that the LLM results reflect prompt-sensitive output heuristics rather than the geometric structures characterized in the controlled experiments. This is load-bearing for the claim that the same factors operate at scale.

    Authors: We agree that explicit cross-validation would strengthen the link between the controlled experiments and the LLM results. In the revised manuscript, we have added a new analysis applying the congruency paradigm directly to the small IWL and ICL transformer models. This demonstrates that the behavioral distinctions recovered by the paradigm align closely with the internal linear embeddings and match-and-copy strategies previously identified via direct inspection of representations and weights. These results are now reported in an expanded section on the congruency paradigm and discussed in relation to the LLM findings, supporting the interpretation that the same underlying factors are at play at scale. revision: yes

  2. Referee: [Methods / ICL training regime] The abstract and results state that ICL models generalize transitively 'only when it is necessitated by the training data.' The precise data-generation procedure, the fraction of transitive versus non-transitive examples, and the statistical criteria used to classify a model as exhibiting transitive inference versus match-and-copy are not specified with sufficient detail to allow independent replication or to rule out post-hoc selection of thresholds.

    Authors: We thank the referee for highlighting this gap in methodological detail. In the revised manuscript, we have substantially expanded the Methods section to provide a complete specification of the ICL data-generation procedure, including the exact proportions of transitive and non-transitive examples in the training distribution, the sampling process for in-context examples, and the precise statistical criteria and performance thresholds used to classify transitive inference versus match-and-copy behavior on held-out test sets. These additions ensure full replicability and eliminate ambiguity regarding threshold selection. revision: yes

Circularity Check

0 steps flagged

No significant circularity; empirical results are self-contained

full rationale

The paper reports experimental comparisons of separately trained IWL and ICL transformer models on transitive inference tasks, observing distinct generalization patterns and internal representations, then applies a congruency paradigm to probe LLMs without access to training data. These outcomes derive from independent training runs, behavioral measurements, and direct observations rather than any derivation, equation, or fitted parameter that reduces to the paper's own inputs by construction. No self-definitional loops, fitted inputs renamed as predictions, or load-bearing self-citations appear in the reported chain; the central claims about training regime and geometric structure rest on external benchmarks from the experiments themselves.

Axiom & Free-Parameter Ledger

0 free parameters · 1 axioms · 0 invented entities

The central claims rest on standard domain assumptions from psychology and machine learning about what constitutes transitive inference and how IWL versus ICL should be operationalized; no free parameters or invented entities are introduced in the abstract.

axioms (1)
  • domain assumption Transitive inference tasks drawn from psychology validly measure relational reasoning capacity in artificial models
    Invoked throughout the abstract as the basis for choosing the experimental tasks and interpreting generalization patterns.

pith-pipeline@v0.9.0 · 5824 in / 1313 out tokens · 34409 ms · 2026-05-19T11:26:51.369888+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

24 extracted references · 24 canonical work pages · 3 internal anchors

  1. [1]

    Relational inductive biases, deep learning, and graph networks

    URL http://arxiv.org/abs/1806.01261. arXiv:1806.01261 [cs, stat]. Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-V oss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemen...

  2. [2]

    Language Models are Few-Shot Learners

    URL http://arxiv.org/abs/2005.14165. arXiv:2005.14165 [cs]. Stephanie C. Y . Chan, Ishita Dasgupta, Junkyung Kim, Dharshan Kumaran, Andrew K. Lampinen, and Felix Hill. Transformers generalize differently from information stored in context vs in weights, October 2022a. URL http://arxiv.org/abs/2210.05675. arXiv:2210.05675 [cs]. Stephanie C Y Chan, Adam San...

  3. [3]

    doi: 10.1016/ j.neuron.2004.08.028

    ISSN 0896-6273. doi: 10.1016/ j.neuron.2004.08.028. URL https://www.cell.com/neuron/abstract/S0896-6273(04) 00529-X. Publisher: Elsevier. Thomas L. Griffiths, Jian-Qiao Zhu, Erin Grant, and R. Thomas McCoy. Bayes in the age of intelligent machines, November

  4. [4]

    arXiv:2311.10206 [cs]

    URL http://arxiv.org/abs/2311.10206. arXiv:2311.10206 [cs]. Greg Jensen, Fabian Muñoz, Yelda Alkan, Vincent P. Ferrera, and Herbert S. Terrace. Implicit Value Updating Explains Transitive Inference Performance: The Betasort Model. PLOS Com- putational Biology, 11(9):e1004523, September

  5. [5]

    A bio-inspired bistable recurrent cell allows for long-lasting memory.PLOS ONE, 16(6):e0252676, 2021

    ISSN 1553-7358. doi: 10.1371/journal. pcbi.1004523. URL https://journals.plos.org/ploscompbiol/article?id=10.1371/ journal.pcbi.1004523. Publisher: Public Library of Science. Kenneth Kay, Natalie Biderman, Ramin Khajeh, Manuel Beiran, Christopher J. Cueva, Daphna Shohamy, Greg Jensen, Xue-Xin Wei, Vincent P. Ferrera, and Lf Abbott. Emergent neural dynamic...

  6. [6]

    doi: 10.1371/journal.pcbi.1011954

    ISSN 1553-7358. doi: 10.1371/journal.pcbi.1011954. URL https://dx.plos.org/10.1371/journal.pcbi.1011954. Diederik P. Kingma and Jimmy Lei Ba. Adam: a Method for Stochastic Optimization. International Conference on Learning Representations 2015 , pages 1–15,

  7. [7]

    Adam: A Method for Stochastic Optimization

    arXiv: 1412.6980. Brenden M. Lake and Marco Baroni. Human-like systematic generalization through a meta- learning neural network. Nature, 623(7985):115–121, November

  8. [8]

    doi: 10.1038/s41586-023-06668-3

    ISSN 0028-0836, 1476-4687. doi: 10.1038/s41586-023-06668-3. URL https://www.nature.com/articles/ s41586-023-06668-3 . Brenden M. Lake, Ruslan Salakhutdinov, and Joshua B. Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, December

  9. [9]

    doi: 10.1126/science.aab3050

    ISSN 0036-8075, 1095-9203. doi: 10.1126/science.aab3050. URL https://www.science.org/doi/ 10.1126/science.aab3050. Andrew K. Lampinen, Arslan Chaudhry, Stephanie C. Y . Chan, Cody Wild, Diane Wan, Alex Ku, Jörg Bornschein, Razvan Pascanu, Murray Shanahan, and James L. McClelland. On the generalization of language models from in-context learning and finetu...

  10. [10]

    arXiv:2505.00661 [cs]

    URL http://arxiv.org/abs/2505.00661. arXiv:2505.00661 [cs]. Zhiming Li, Yushi Cao, Xiufeng Xu, Junzhe Jiang, Xu Liu, Yon Shin Teo, Shang-wei Lin, and Yang Liu. LLMs for Relational Reasoning: How Far are We?, January

  11. [11]

    arXiv:2401.09042 [cs]

    URL http: //arxiv.org/abs/2401.09042. arXiv:2401.09042 [cs]. Samuel Lippl, Kenneth Kay, Greg Jensen, Vincent P. Ferrera, and Larry Abbott. A mathematical theory of relational generalization in transitive inference. Proceedings of the National Academy of Sciences, 121(28):e2314511121, July

  12. [12]

    URL https://www

    doi: 10.1073/pnas.2314511121. URL https://www. pnas.org/doi/full/10.1073/pnas.2314511121. Publisher: Proceedings of the National Academy of Sciences. Andrew Liu, Henry Prior, Gargi Balasubramaniam, Rivka Moroshko, Amir Zait, Danny Karmon, Ishita Dasgupta, Kim Stachenfeld, and Kenneth Marino. RECOGLAB: A FRAMEWORK TEST- ING RELATIONAL REASONING & COGNITIVE...

  13. [13]

    Thomas Miconi and Kenneth Kay

    URL https://proceedings.neurips.cc/paper_files/paper/2019/hash/ 2c601ad9d2ff9bc8b282670cdd54f69f-Abstract.html. Thomas Miconi and Kenneth Kay. Neural mechanisms of relational learning and fast knowledge reassembly in plastic neural networks. Nature Neuroscience, pages 1–9, January

  14. [14]

    Miconi and K

    ISSN 1546-1726. doi: 10.1038/s41593-024-01852-8. URL https://www.nature.com/articles/ s41593-024-01852-8 . Publisher: Nature Publishing Group. Tom M Mitchell. The Need for Biases in Learning Generalizations

  15. [15]

    doi: 10.1016/0010-0285(76)90025-6

    ISSN 0010-0285. doi: 10.1016/0010-0285(76)90025-6. URL https://www.sciencedirect.com/science/article/pii/0010028576900256. Stephanie Nelli, Lukas Braun, Tsvetomira Dumbalska, Andrew Saxe, and Christopher Summerfield. Neural knowledge assembly in humans and neural networks. Neuron, 111(9):1504–1516.e9, May

  16. [16]

    doi: 10.1016/j.neuron.2023.02.014

    ISSN 08966273. doi: 10.1016/j.neuron.2023.02.014. URL https://linkinghub. elsevier.com/retrieve/pii/S0896627323001186. Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Scott Johnston, Andy Jo...

  17. [17]

    arXiv:2312.03002 [cs]

    URL http://arxiv.org/abs/2312.03002. arXiv:2312.03002 [cs]. Lingfeng Shen, Aayush Mishra, and Daniel Khashabi. Do pretrained Transformers Learn In-Context by Gradient Descent?, June

  18. [18]

    arXiv:2310.08540 [cs]

    URL http://arxiv.org/abs/2310.08540. arXiv:2310.08540 [cs]. Aaditya K. Singh, Stephanie C. Y . Chan, Ted Moskovitz, Erin Grant, Andrew M. Saxe, and Felix Hill. The Transient Nature of Emergent In-Context Learning in Transformers, December

  19. [19]

    arXiv:2311.08360 [cs]

    URL http://arxiv.org/abs/2311.08360. arXiv:2311.08360 [cs]. Aaditya K. Singh, Ted Moskovitz, Felix Hill, Stephanie C. Y . Chan, and Andrew M. Saxe. What needs to go right for an induction head? A mechanistic study of in-context learning circuits and their formation, April

  20. [20]

    arXiv:2404.07129 [cs]

    URL http://arxiv.org/abs/2404.07129. arXiv:2404.07129 [cs]. Sivaramakrishnan Swaminathan, Antoine Dedieu, Rajkumar Vasudeva Raju, Murray Shanahan, Miguel Lazaro-Gredilla, and Dileep George. Schema-learning and rebinding as mechanisms of in-context learning and emergence, June

  21. [21]

    arXiv:2307.01201 [cs]

    URL http://arxiv.org/abs/2307.01201. arXiv:2307.01201 [cs]. Marco Vasconcelos. Transitive inference in non-human animals: An empirical and theoreti- cal analysis. Behavioural Processes , 78(3):313–334, July

  22. [22]

    doi: 10.1016/j.beproc.2008.02.017

    ISSN 0376-6357. doi: 10.1016/j.beproc.2008.02.017. URL https://www.sciencedirect.com/science/article/ pii/S0376635708000818. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30,

  23. [23]

    doi: 10.18653/v1/P19-1580

    Association for Computational Linguistics. doi: 10.18653/v1/P19-1580. URL https://aclanthology.org/P19-1580/. Sohee Yang, Elena Gribovskaya, Nora Kassner, Mor Geva, and Sebastian Riedel. Do Large Language Models Latently Perform Multi-Hop Reasoning?, February

  24. [24]

    arXiv:2402.16837 [cs]

    URL http://arxiv.org/ abs/2402.16837. arXiv:2402.16837 [cs]. A Additional experimental details A.1 Dataset and preprocessing We used pre-computed ResNet18 embeddings of Omniglot images as input features. These em- beddings were taken from a dataset provided by [Singh et al., 2023]. All experiments employed hierarchies of N = 7 items (A, B, C, D, E, F, G)....