paper-with-me

홈 › Papers

Finite State Automata Inside Transformers with Chain-of-Thought: A Mechanistic Study on State Tracking

2025-02-27 · Yifan Zhang, Wenyu Du, Dongming Jin, Jie Fu, Zhi Jin

Chain-of-Thought (CoT) significantly enhances the performance of large language models (LLMs) across a wide range of tasks, and prior research shows that CoT can theoretically increase expressiveness. However, there is limited mechanistic understanding of the algorithms that Transformer+CoT can learn. In this work, we (1) evaluate the state tracking capabilities of Transformer+CoT and its variants, confirming the effectiveness of CoT. (2) Next, we identify the circuit, a subset of model components, responsible for tracking the world state, finding that late-layer MLP neurons play a key role. We propose two metrics, compression and distinction, and show that the neuron sets for each state achieve nearly 100% accuracy, providing evidence of an implicit finite state automaton (FSA) embedded within the model. (3) Additionally, we explore three realistic settings: skipping intermediate steps, introducing data noise, and testing length generalization. Our results demonstrate that Transformer+CoT learns robust algorithms (FSA), highlighting its resilience in challenging scenarios.

📄 PDF Abstract BibTeX arXiv:2502.20129

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Simulating Weighted Automata over Sequences and Trees with Transformers

2024-03-12 · Michael Rizvi, Maude Lizaire, Clara Lacroce, Guillaume Rabusseau

Transformers are ubiquitous models in the natural language processing (NLP) community and have shown impressive empirical successes in the past few years. However, little is understood about how they reason and the limit…

On the Theory of Stochastic Automata

2021-03-26 · Merve Nur Cakir, Mehwish Saleemi, Karl-Heinz Zimmermann

The theory of discrete stochastic systems has been initiated by the work of Shannon and von Neumann. While Shannon has considered memory-less communication channels and their generalization by introducing states, von Neu…

Partial Answer of How Transformers Learn Automata

2025-04-29 · Tiantian Zhang

We introduce a novel framework for simulating finite automata using representation-theoretic semidirect products and Fourier modules, achieving more efficient Transformer-based implementations.

Transformers are Inherently Succinct

2025-10-22 · Pascal Bergsträßer, Ryan Cotterell, Anthony W. Lin arxiv

We study succinctness as a measure of the expressive power of transformers. Succinctness -- how compactly a formalism can describe a language relative to other formalisms -- is a classical notion in logic and automata th…

On the Derivational Entropy of Left-to-Right Probabilistic Finite-State Automata and Hidden Markov Models

2018-03-01 · CL 2018 3 · Joan Andreu S{\'a}nchez, Martha Alicia Rocha, Ver{\'o}nica Romero, Mauricio Villegas

Probabilistic finite-state automata are a formalism that is widely used in many problems of automatic speech recognition and natural language processing. Probabilistic finite-state automata are closely related to other f…

Automatic Speech RecognitionAutomatic Speech Recognition (ASR)speech-recognitionSpeech Recognition