atlas

Research map / Architectures and efficiency / Attention and transformers

How Transformers Learn Regular Language Recognition: A Theoretical Study on Training Dynamics and Implicit Bias

ICML 2025 · Architectures and efficiency › Attention and transformers · approach: Transformer expressivity and learnability · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Theoretically analyzes gradient-descent training dynamics of a one-layer transformer (softmax attention + linear layer) on the even pairs and parity check regular-language tasks, showing two-phase dynamics with max-margin implicit bias, and proposes truncated and teacher-forced CoT for parity.

Problem

Understanding how transformers are trained to recognize regular languages (even pairs and parity check), where training dynamics and implicit bias are largely unstudied theoretically, and parity check is hard without chain-of-thought.

Approach

Jointly analyzes gradient descent on attention and linear layers of a one-layer transformer for even pairs, showing a rapid-growth phase producing separable attention outputs followed by convergence of the linear layer in direction to a max-margin hyperplane with O(1/t) loss decay; extends to parity check via zero-shot truncated CoT inference from the even-pairs model or CoT training under teacher

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Train the one-layer transformer jointly on attention and linear layers for even pairsOne-layer transformer · Even pairsclassificationHelped
Continue training the linear layer after the attention outputs become separableOne-layer transformer · Even pairsclassification marginHelped
Use the even-pairs-trained transformer with truncated CoT at inferenceOne-layer transformer trained on even pairs · Parity checkclassificationHelped
Add even-pairs regularization to teacher-forced CoT trainingOne-layer transformer trained for parity check · Parity check via CoTgradient behaviorHelped
Remove the even-pairs regularization loss from teacher-forced CoT training (ablation)One-layer transformer trained for parity check · Parity check via CoTgradient behaviorHurt
Use a two-phase gradient-descent schedule for joint attention and linear-layer trainingOne-layer transformer · Even pairslossHelped
Use teacher-forced CoT with even-pairs regularizationOne-layer transformer · Parity check via CoTclassificationHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic binary sequences over {a,b} for even pairs and parity check

Metrics: logistic loss token score dynamics attention weights alignment of linear layer with max-margin direction

Builds on: chain-of-thought max-margin implicit bias of gradient descent

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy