Lune

ICLR2023Top-tier venue

Characterizing intrinsic compositionality in transformers with Tree Projections

Shikhar Murty, Pratyusha Sharma, Jacob Andreas, Christopher D. Manning

Abstract

When trained on language data, do transformers learn some arbitrary computation that utilizes the full capacity of the architecture or do they learn a simpler, tree-like computation, hypothesized to underlie compositional meaning systems like human languages? There is an apparent tension between compositional accounts of human language understanding, which are based on a restricted bottom-up computational process, and the enormous success of neural models like transformers, which can route information arbitrarily between different parts of their input. One possibility is that these models, while extremely flexible in principle, in practice learn to interpret language hierarchically, ultimately building sentence representations close to those predictable by a bottom-up, tree-structured model. To evaluate this possibility, we describe an unsupervised and parameter-free method to functionally project the behavior of any transformer into the space of tree-structured networks. Given an input sentence, we produce a binary tree that approximates the transformer's representation-building process and a score that captures how "tree-like" the transformer's behavior is on the input. While calculation of this score does not require training any additional models, it provably upper-bounds the fit between a transformer and any tree-structured approximation. Using this method, we show that transformers for three different tasks become more tree-like over the course of training, in some cases unsupervisedly recovering the same trees as supervised parsers. These trees, in turn, are predictive of model behavior, with more tree-like models generalizing better on tests of compositional generalization.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

19 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • What does the Knowledge Neuron Thesis Have to do with Knowledge? cites Interpretability at Scale: Identifying Causal Mechanisms in Alpaca
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers19

  1. Interpretability at Scale: Identifying Causal Mechanisms in AlpacaZhengxuan Wu, Atticus Geiger, Thomas Icard, Christopher Potts et al.NeurIPS 2023 · 146 citations
  2. The Truth is in There: Improving Reasoning in Language Models with Layer-Selective Rank ReductionPratyusha Sharma, Jordan T. Ash, Dipendra MisraICLR 2024 · 135 citations
  3. Sudden Drops in the Loss: Syntax Acquisition, Phase Transitions, and Simplicity Bias in MLMsAngelica Chen, Ravid Shwartz-Ziv, Kyunghyun Cho, Matthew L. Leavitt et al.ICLR 2024 · 119 citations
  4. What does the Knowledge Neuron Thesis Have to do with Knowledge?Jingcheng Niu, Andrew Liu, Zining Zhu, Gerald PennICLR 2024 · 53 citations
  5. Self-attention Networks Localize When QK-eigenspectrum ConcentratesHan Bao, Ryuichiro Hataya, Ryo KarakidaICML 2024 · 16 citations

Builds on2

  1. COGS: A Compositional Generalization Challenge Based on Semantic InterpretationNajoung Kim, Tal LinzenEMNLP 2020 · 149 citations
  2. Beyond Accuracy: Behavioral Testing of NLP Models with CheckListMarco Túlio Ribeiro, Tongshuang Wu, Carlos Guestrin, Sameer SinghACL 2020 · 51 citations

Related papers

  1. R2D2: Recursive Transformer based on Differentiable Tree for Interpretable Hierarchical Language ModelingXiang Hu, Haitao Mi, Zujie Wen, Yafang Wang et al.ACL 2021
  2. Compositional Capabilities of Autoregressive Transformers: A Study on Synthetic, Interpretable TasksRahul Ramesh, Ekdeep Singh Lubana, Mikail Khona, Robert P. Dick et al.ICML 2024 · 17 citations
  3. Semantic Training Signals Promote Hierarchical Syntactic Generalization in TransformersAditya Yedetore, Najoung KimEMNLP 2024 · 4 citations
  4. How Transformers Learn Structured Data: Insights From Hierarchical FilteringJerome Garnier-Brun, Marc Mézard, Emanuele Moscato, Luca SagliettiICML 2025
  5. How Transformers Represent Hierarchies: A Local-to-Global MechanismZhiling Zhou, Tianhao Wang, Zhuoran YangICML 2026
Dusk over the sea between two cliffs drawn in fine vertical lines