Skip to main content
QUICK REVIEW

[论文解读] On Limitations of the Transformer Architecture

Binghui Peng, Srini Narayanan|arXiv (Cornell University)|Feb 13, 2024
Power Transformer Diagnostics and InsulationEngineering被引用 7
一句话总结

本论文使用通信复杂性论证和对数空间考量,证明单层和多层 Transformer 注意力在执行函数组合和某些组合性任务方面的基本局限性,并讨论对幻觉和链式推理提示的含义。

ABSTRACT

What are the root causes of hallucinations in large language models (LLMs)? We use Communication Complexity to prove that the Transformer layer is incapable of composing functions (e.g., identify a grandparent of a person in a genealogy) if the domains of the functions are large enough; we show through examples that this inability is already empirically present when the domains are quite small. We also point out that several mathematical tasks that are at the core of the so-called compositional tasks thought to be hard for LLMs are unlikely to be solvable by Transformers, for large enough instances and assuming that certain well accepted conjectures in the field of Computational Complexity are true.

研究动机与目标

  • Motivate the investigation of root causes of hallucinations in Transformers and identify a fundamental operation (function composition) that is hard for the architecture
  • Formalize a theoretical impossibility result for a single Transformer attention layer to reliably compute function composition under certain domain size and precision constraints
  • Extend the impossibility analysis to chain-of-thought prompts and iterated composition, quantifying the cost in prompt length
  • Relate Transformer capabilities to classical complexity classes and memory models to explain observed compositionality failures in multi-layer Transformers
  • Discuss broader implications for training strategies and grounding approaches to mitigate hallucinations

提出的方法

  • Model Transformer computation via a formal self-attention unit with inputs X, keys K, queries Q, values V and H heads as in Equation (1)
  • Define the function composition problem with domain sizes |A|=|B|=|C|=n and analyze under a precision p and embedding dimension d
  • Use a Communication Complexity framework with three agents (Faye, Grace, Xavier) and derive a lower bound showing that fewer than n log n bits of communication from Faye to Xavier cannot yield correct composition
  • Prove Theorem 1: if n log n > H(d+1)p, a single H-headed Transformer layer cannot solve function composition with high probability, via a reduction to a communication task (Lemma 1)
  • Apply information-theoretic arguments (mutual information, Fano’s inequality) to bound error probability in composition
  • Examine Chain-of-Thought (CoT) impact via Theorem 2, showing required CoT steps grow as Omega(sqrt(n/(Hdp))) for iterated composition via a pointer-chasing reduction
  • Provide a complementary impossibility argument for multiple layers and other compositional tasks (Theorem 3) using log-space considerations
  • Discuss memory/computation class implications by linking Transformer computation to log-space (L) and NL/P connectivity and deriving limits for Derivability, 2-SAT, Horn SAT, and Circuit evaluation

实验结果

研究问题

  • RQ1Can a single Transformer attention layer reliably compute function composition for large enough domains?
  • RQ2How does the dimensionality and precision of embeddings, and the number of attention heads, constrain the ability to perform composition?
  • RQ3To what extent do chain-of-thought prompts mitigate composition limitations, and what is the required prompt length for deeper compositions?
  • RQ4Do multi-layer Transformers inherit these composition limitations, and how do they relate to known complexity classes like L, NL, P?
  • RQ5What is the link between Transformer compositional abilities and broader tasks such as derivability, SAT variants, and circuit evaluation under standard complexity assumptions?

主要发现

  • A single multi-head attention layer cannot reliably compute function composition when n log n exceeds H(d+1)p, implying a fundamental limitation due to softmax-based information propagation
  • Chain-of-Thought prompts can help with simple composition but require arbitrarily many CoT steps to generalize to deep iterated composition (Theorem 2)
  • Iterated composition tasks require a super-logarithmic number of CoT steps in relation to domain size and architecture parameters, indicating growing difficulty with depth
  • Under widely accepted memory complexity assumptions (L vs NL, etc.), multi-layer Transformers cannot reliably solve several elementary compositional tasks (Theorem 3)
  • The analysis connects Transformer limitations to log-space hardness and standard complexity results, offering a theoretical account for observed compositionality failures in practice

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。