arXiv paper· machine learning — interpretability of language models (optimal transport analysis)· empirical study

Measuring Optimal Transport in Transformer Depth

Alexandre Quemy

cs.CL

Quick verdict

Trained Pythia-160m/410m move final-layer tokens along the OT map; first layers do not; middle unresolved. Sound, thin, two small models.

Summary

The paper asks whether trained transformers move their token-state clouds the way optimal transport (OT) would: at minimal cost, and along the Brenier optimal map. It tests Pythia-160m and Pythia-410m on WikiText-103 and Pile, comparing consecutive layer clouds via exact, unregularized assignment inside a 16-d PCA camera (n=4,000 per side). Transport efficiency is corrected by a measured finite-sample floor, gated by a resolvability threshold, calibrated on constructed optimal couplings (readings 0.85-1.00), split into common shift versus token-specific movement, and bounded below by a calibration-free sliced Wasserstein bound; a linear Gaussian Brenier map serves as control. At every resolvable transition the token-specific cost reads optimal except at the 160m exit (0.86 vs 1.00 calibration). Rank agreement with the OT map grows with depth (rho=0.89 at the 160m exit, 0.88 at 410m); training raises it (0.64 to 0.86) while entry agreement decreases. A linear map accounts for 410m's exit agreement, whereas 160m's is 39% linear with a nonlinear remainder still agreeing at rho=0.83. Main limitations: only 4 of 12 (160m) and 5 of 24 (410m) transitions are resolvable; scope covers two small models and two corpora; code availability is not stated.

Review complete

Assessment at a glance

machine learning — interpretability of language models (optimal transport analysis)

6

risk flags identified

● high 0

● medium 4

● low 2

Reproducibility readinessmedium
Code & data availablenot stated
Review confidencehigh
AI text signal0/20 passages flagged
Deep research viableCode-reproducible

4 strengths · 5 weaknesses · 5 author questions

AI text signal = Binoculars zero-shot detector score over 20 sampled passages (Fast-DetectGPT co-reported) — absence does not prove human authorship, and a flag does not imply misconduct.

Levels reflect verification complexity — not a quality score. Evolve never rates your paper.

Key claims under review

  • At the last transition, both Pythia-160m and Pythia-410m move their tokens along the exact optimal-transport (Brenier) map between consecutive layer clouds, with rank agreement 0.89 and 0.88 respectively.
  • The token-specific cost of the network's move reads optimal at every resolvable transition, except at the exit of Pythia-160m, which reads 0.86 against a 1.00 calibration (14–27% above the cheapest move).
  • Agreement with the optimal-transport map at the last layer is learned: it rises from 0.64 at initialization to 0.86 when trained, while entry agreement decreases (0.52 to 0.37).
  • For Pythia-160m the exit-layer agreement is genuinely nonlinear (only 39% explained by the linear Gaussian Brenier map, remainder agreeing at rho 0.83), whereas for Pythia-410m it is accounted for by a linear map (90% explained).

Strengths

  • Honest measurement protocol for a hard quantity

    Section 3.1 subtracts a measured finite-sample floor (Sinkhorn-divergence-style self-term), reports transitions as 'n.r.' when the floor exceeds 30% of the cost in question, and calibrates the instrument on two couplings optimal by construction (shift and radius-matched expansion, readings 0.85–1.00); the calibration-free sliced lower bound of Section 3.2 (0.94 at the 160m entry, 0.73 at exit) independently corroborates the verdicts.

  • The confounder is controlled explicitly

    The common shift A of the cloud dominates cost at most transitions (A/P 1.5–2.5 full-space, 84 at the 160m exit, Table 3); the paper correctly separates shift from token-specific movement P and asks the OT question only on P, preventing trivially-optimal 'shift-only' transitions from masquerading as OT behavior.

  • The obvious null explanation is tested

  • Training dynamics are a discriminating result

Weaknesses

  • Severely sparse resolvability

  • The 16-d projection is not fully validated

  • Instrument readings strain the stated precision

  • Table 1's resolvability rule is not self-consistent

  • Thin support and framing

Full Review Report

$1.99 · one-time

Unlock the complete preliminary analysis Evolve produced for this paper.

Report preview

Scope & Claims

The paper asks whether trained transformers move their token-state cloud as optimal transport (OT) would: (i) at minimal cost — is the network's pairing as cheap as the exact W2^2 between consecutive layer clouds? — and (ii) along the Brenier map — does token i's actual displacement match the displacement an optimal coupling prescribes? Tested on Pythia-160m (12 layers) and Pythia-410m (24 layers) over WikiText-103 and Pile samples, in a 16-d PCA camera. Headline results (abstract, Sections 3–4): at the last transition both models follow the OT map (rho 0.89 / 0.88); the token-specific cost reads optimal at every resolvable transition except the 160m exit (0.86 vs 1.00 calibration); agreement is weak at initialization (0.64 vs 0.86 trained) and grows with training; first-layer agreement is low (0.41 / 0.50). The claimed novelty — the first empirical test of the network's own coupling against exact, unregularized OT between its own layer clouds — is credible given the related work reviewed (intra-attention OT, OT-regularized training).

The remaining sections cover Methodology Assessment, Statistical Evidence, Results & Reproducibility, Limitations & Risks, and Verdict & Recommendations.

  • All 4 strengths & 5 weaknesses, analyzed in detail
  • 6 risk flags with severity, section & reviewer questions
  • Methods & statistical evidence assessment
  • 5 questions a peer reviewer would ask
  • Full six-dimension evaluation report & recommendations

One-time purchase · this paper only

One-time purchase, this paper only. AI-generated preliminary analysis — not peer review.

Frequently asked questions

What does the paper claim transformers do with token states across layers?

It claims that at the last layer of the trained Pythia-160m and Pythia-410m models, tokens move essentially where optimal transport would send them — at optimal cost for 410m and near-optimal for 160m — while the first layer does not, and middle layers move tokens too little to be judged individually with 4,000 samples.

What is 'transport efficiency' in this paper?

It is the ratio of the cheapest possible cost to move the layer's token cloud (the squared Wasserstein distance) to the cost actually paid by the network's own token-to-token pairing; after removing the cloud's common shift and a measured sampling floor, a value of 1 means the network moves tokens at the optimal price.

Did the authors find the transformer is exactly an optimal transport map?

No. Only the last layer approaches it (rank agreement 0.89 for Pythia-160m and 0.88 for 410m), the first layer does not (0.41 and 0.50), and the 160m exit pays 14–27% more than the optimal cost. Middle layers could not be judged one at a time.

Does this hold for large language models?

The study covers only two small models of the Pythia family (160m and 410m parameters) on WikiText-103 and Pile samples, so nothing in the paper establishes whether the finding generalizes to larger models or other architectures; the authors list this as an open question.

About this review

This is an AI-generated preliminary review by Evolve.Pub, produced from the openly available text of the paper. It is not peer review and does not represent the authors' views. The canonical record of the paper is at the publisher link above.

  • Table 1/2 column labels are slightly garbled by PDF extraction (the raw-vs-centered column split is reconstructed from values); individual numbers are quoted as extracted and may shift under corrected column assignment.
  • Figures are images: only numeric values restated in the text are available (e.g., Figure 1 curves are not readable; Figure 3's per-transition rho values come from its caption labels).

Go deeper on this paper

Wrote a paper? Stress-test it before reviewers do.

Upload your manuscript for the same structured scrutiny — reasoning, statistics, evidence, figures, and reproducibility.

Scan your paper
Measuring Optimal Transport in Transformer Depth | Evolve.Pub