atlas

Research map / Architectures and efficiency / Attention and transformers

Optimality and NP-Hardness of Transformers in Learning Markovian Dynamical Functions

NeurIPS 2025 · Architectures and efficiency › Attention and transformers · approach: Training dynamics of in-context learning · 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.

Studies in-context learning of binary Markov chain dynamics with linear self-attention, deriving global minimizers in a reparameterized space, proving NP-hardness of recovering 1-layer LSA parameters, and interpreting multilayer LSA forward passes as preconditioned multi-objective optimization.

Problem

Understanding how transformers perform in-context learning when the in-context examples are Markov chain trajectories governed by a shared transition kernel, a setting beyond i.i.d. linear regression ICL.

Approach

Reparameterize the single-layer linear self-attention objective into a strictly convex problem over an enlarged parameter space with closed-form minimizer, show mapping back to actual transformer parameters is NP-hard via reduction from bilinear separability, and interpret multilayer LSA forward passes as preconditioned gradient descent on multiple objectives.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Increase LSA depth from 1 layer to 3 layersLSA · Markovian prompts, |S|=3mean accuracy: 0.55 -> 0.98Helped
Use dense rather than sparse P,Q parameter matrices (ablation)single-layer LSA · Length-2 Markov chainstraining lossNo clear effect
Increase depth from 1 to 3 layersLSA · Markovian prompts with state-space sizes 2, 3, and 4accuracyHelped
Increase depth beyond the initial layers10-layer LSA in the restricted parameter space · 100 in-context Markov chains of length 5objective valuesMixed
Use the reparameterized model instead of 1-layer LSAMarkovian dynamics prediction · Binary Markov chains as dimension d increasesaccuracyHelped
Increase Markov-chain dimension1-layer LSA relative to the reparameterized model · Binary Markov chainsaccuracy gapHurt
Use small or standard GPT-2 configurations instead of the tiny configurationGPT-2-based transformers · Markovian prompts with independent and correlated initial statestest accuracyHelped
Use trained small or standard transformers instead of 3-NNMarkovian next-token prediction · Markovian prompts with independent and correlated initial statestest accuracyHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic binary Markov chains

Benchmarks: synthetic Markov chain ICL prompts

Metrics: accuracy mean squared error generational distance

Baselines: logistic regression linear regression 3-nearest neighbors support vector machine reparameterized least-squares model

Builds on: linear self-attention ICL theory (preconditioned gradient descent) reparameterization of LSA objective for linear regression

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