Part 1 · The idea
1Why softmax, not linear attention?
Transformers can run learning algorithms in context. For reinforcement learning, the constructions that improve a policy, and not only evaluate it, have used linear attention: its unnormalized bilinear products can carry a semi-gradient or actor–critic update. Standard softmax attention behaves differently. Its outputs are positive, normalized mixtures, and the constructive results for it have stopped at policy evaluation (temporal-difference learning).
For one well-known control update that normalization is not an obstacle but the update itself. Negative-entropy policy mirror descent (PMD) reweights each action by the exponential of its value and renormalizes:
State by state, that is exactly a softmax of the old log-probabilities plus the scaled values:
The identity is classical. What is new is treating it as the native actor of a causal Transformer and asking which control guarantees follow, and where they stop.
2Three calls, three errors
Each round runs in a fixed order: the actor must form a policy before the environment can sample under it, and the critic may only evaluate that policy after the samples exist. The order separates three kinds of error.
How should the policy change?
Actor · softmax routing error
Memories carry each state–action pair’s and ; a query routes to its own state’s memories and the softmax takes the PMD step. With a finite margin , other states’ memories keep a small weight; measures how far the row ends up from exact PMD.
What happens under the new policy?
Environment · sampling
The environment draws fresh transitions, with successor actions taken from the policy the actor just produced. The guarantee assumes a generative oracle: a fresh batch for every state–action pair, every round.
How good is the new policy?
Critic · TD error
The critic first looks up the next state’s value for each transition and forms a TD target, then averages the targets for each state–action pair. measures its distance from an exact one-step evaluation of the produced policy.
A greedy-defect recursion then carries and through the rounds into a bound on , the loss of the policy the loop finally returns (§13). The last critic call does not enter, because the returned policy is formed before it.
3Why a stronger step can backfire
A larger step makes ideal PMD greedier, which helps. It also spreads the scores further apart, and a finite margin has to keep the other states’ memories down against that spread. In a two-state family where every quantity is exact, the competition reduces to one ratio, for reward scale : the implemented update improves the policy when and makes it worse when .
Within one state, the common level of the -values cancels out of PMD. Across states it does not: it shifts the two states’ softmax normalizers in opposite directions, by in total. So a larger step uses up the margin faster than it sharpens the intended row. The critic is exact throughout: the wrong action is chosen from a perfect value table.
4The decoder in one picture
- Small and fixed. 2 blocks, 2 heads, head width S+A+3 and model width 6S+6A+14, with a gated ReLU feed-forward map of 8 active units. The same weights serve both calls; the step size arrives as token content.
- Normalization-free. No layer normalization: the value channels must keep controlled amplitudes while the key channels carry score-dependent routing, and normalizing tokens would change both at once.
- Declared before freezing. Step-size caps, packet sizes and coverage floors are fixed before the margins are chosen and the weights frozen; the bound holds for that declared horizon.
5Where it runs
The two NeurIPS 2026 workshop papers split the work: one builds the loop and its guarantee and checks a learned Transformer against it; the other maps where the loop fails. Two ICAIF 2026 workshop papers take the update rule into synthetic finance settings.
PTA Workshop, NeurIPS 2026 tested
Construction, guarantee, learned realization
The causal loop, the returned-policy bound, a learned pre-LN Transformer, repeated control by trained actors, and the decoder with the coverage oracle relaxed. OpenReview
EvoRobust Workshop, NeurIPS 2026 tested
Failure modes and robustness
The exact reversal boundary, the state-local mask, a learned stress screen and a matched audit of the values the learned actor actually produces. OpenReview
ICAIF 2026 workshops
Synthetic allocation and market making
Whether trained attention controllers obey the update they are said to implement, and which learned part limits an in-context market maker. Market-making pages
Part 2 · The evidence
Tested so far NeurIPS 2026 workshops
- The exact decoder on the two-state family: 1,803 grid cells, with and without a state-local mask
- The same decoder with the coverage oracle relaxed, on 64 random MDPs
- A learned pre-LN Transformer against PMD and four fixed rules on held-out MDPs
- 5 separately trained actors in repeated control over 20 rounds, with an exact critic
- A learned stress screen, a matched audit on a retrained checkpoint, and visible-versus-masked actors
Not yet tested Open
- A learned critic run on ordinary trajectory data
- Learned closed-loop rollouts with matched actor and critic errors
- Hard-exploration MDPs
6How we test it
Every experiment uses small finite MDPs where the true values can be computed exactly, so each error is measured against the truth rather than estimated. Two kinds of evidence are kept apart.
- The exact construction. The fully specified decoder, run as written. On the two-state family every number is a deterministic computation; in the coverage study the decoder runs on 64 fresh random MDPs with , , , and rounds, its protocol fixed in a file before the run.
- Learned Transformers. Ordinary pre-LN Transformers trained on generated MDPs with disjoint train, validation and test splits, at the same , and . The actor gets no PMD probabilities as labels: it is trained with a KL-proximal objective whose row-wise optimum is PMD, and the critic with Bellman (TD) targets. Learned models are compared with the construction through measured errors; they are not the construction.
Losses are reported as the normalized returned-policy loss : 0 is optimal, 1 is no better than the starting policy.
7Results: the exact decoder
Take the two-state family at margin and raise the step from 0.8 to 2.4. Ideal PMD gets better at every step. The implemented update, through the decoder’s own forward map, gets worse and then reverses.
Step η = 0.8
ρ = 0.5 · below the boundary
+0.916 of 0.950Result. The implemented gain keeps most of the ideal gain; the actor’s row error is 0.014.
Step η = 1.6
ρ = 1 · on the boundary
0.000 of 1.660Result. Exactly no improvement: the leaked mass cancels the PMD step. Row error 0.664.
Step η = 2.4
ρ = 1.5 · past the boundary
−2.009 of 2.084Result. The largest ideal gain becomes the largest loss. Row error 1.637, out of a possible 2.
Across the 1,803 cells of the grid ( from 0 to 3 in steps of 0.005, three margins), the unmasked decoder has 840 cells with negative gain and the masked decoder 0. In this family the actor’s row error also predicts the value lost, exactly: .
8Relaxing the coverage oracle
The guarantee assumes the critic receives fresh samples for every state–action pair after each actor call. An acting agent does not get that: it sees one trajectory. The theorem says nothing once the oracle is removed, so we ran its own decoder there. Every arm gets the same budget of 12 fresh transitions per round; only how they are spread differs.
- One on-policy stream of the oracle’s size leaves 3.86 of 12 pairs unvisited per round on average, so the critic error rises from 0.214 to 1.219 at , and the median loss from 0.009 to 0.029 (paired difference 0.018 [0.014, 0.022]). Four times the data brings it down only to 0.016.
- Carrying the old forward for unvisited pairs brings the loss back to 0.010 although the critic error stays large, so the loss appears to come mainly from overwriting unvisited pairs with leaked outputs. That patch is not part of the decoder or the theorem.
9Results: learned Transformers
Does an ordinary Transformer, trained without PMD labels, learn the same map? On held-out MDPs a pre-LN actor’s output is closest to PMD by a wide margin among five fixed rules, and it responds to the step size it is given.
Closest rule
Held-out row-L1 error to PMD
0.0357Result. The next-closest fixed rule is at 0.112. Mean KL to PMD 0.0022; fitted step 0.755–0.810 for a supplied 0.8.
Critic
TD error on held-out MDPs
0.121Result. Mean absolute TD error of the Bellman-trained critic; the largest error seen is 0.676.
Repeated control
5 trained actors · 20 rounds
1.052×Result. Median loss ratio to an exact PMD reference; every run within the registered 1.5× band, none stalled.
One-step correspondence does not show that an actor stays useful when its own outputs become its next inputs. A later study with separately trained actors (5 fresh runs of 51,200 training steps, seeds 12100–12104) put them in a closed loop on 64 held-out MDPs, with an exact one-step critic, so that it tests the actor alone. The reference is exact PMD at each actor’s fitted step, with the same critic.
The same checkpoints, without retraining, kept all 5 run ratios below 1.5 on four declared environment families of the same shape (cross-run medians 0.927, 1.004, 1.014, 0.997). Replacing the exact critic by the learned one, given 6 fresh samples per pair under the returned policy, leaves a small resolved gap to the reference: median 0.000518 [0.000008, 0.002155].
10Stress test and matched audit
Are the learned errors uniformly small? A screen of a separately trained pre-LN checkpoint, 512 examples per condition from 8 generated MDPs, says no: on low-entropy inputs the mean row error to PMD is 0.059 but the largest is 1.977, close to the maximum possible of 2 (all conditions in §15).
Two follow-ups separate what that screen can and cannot say.
- It is not the routing failure. This model’s actor packet for a state holds only that state’s memories, so the competing group of §3 does not exist and a state-local mask would change nothing.
- Large row error is not value loss. On a retrained checkpoint we ran the actor on every state and solved exact values for the policy it returns and for ideal PMD on the same inputs. At low entropy 79 of 512 inputs have negative implemented gain (by 0.126 on average, 1.426 at most), while the input with the largest row error gains 1.775 more than PMD.
To see whether cross-state visibility opens the channel of §3 in learned models, we trained paired actors on a packet holding all 12 memories, with and without a state-local mask (same seed, data and initial weights; 3 seeds, 3,200 steps). Replacing only the other states’ memories, which leaves the PMD target unchanged, moved the visible actor’s row by 0.255 on average on IID inputs (0.320 at low entropy) and the masked actor’s by exactly 0. The masked actor was also closer to PMD: row error 0.022 against 0.084 on IID inputs.
11Limitations and what didn’t work
Scope
- A generative oracle, not trajectories. The guarantee assumes fresh samples for every state–action pair after each actor call, with at least per pair. Trajectory data do not provide this: pairs go unvisited, counts depend on the data, samples are Markov-dependent and successor actions go stale. Step sizes and packet caps are supplied from outside; the decoder does not choose its own schedule.
- Normalization-free. The exact construction has no layer normalization, and nothing is proved for pre-LN, RMSNorm, post-LN or final-LN models. The learned pre-LN model is compared with the construction only through measured errors. The arXiv version also sketches a compilation into a layer-normalized model; its proof leaves constants unnamed and is not relied on here.
- Small generated MDPs. All learned results use , , and generated task families with held-out splits: generalization within the family, not across environments.
- The reversal boundary is exact on one family only. It needs the uniform prior, self-loops, an exact critic and visible cross-state memories. At a tilted prior moves the first negative step from about 1.6 to between 1.22 and 2.36, and a 5% cross-state transition moves it to 2.34. These are numerical sensitivities, not a law. The mask removes this mechanism only; it does not bound critic error, within-state error or learned-actor error, and it needs a state index that a general transcript may not expose.
What the evidence does not show
- No learned critic on trajectory data, and no learned closed-loop rollout with matched errors. Repeated control uses an exact one-step critic; with the learned critic it still uses the balanced oracle.
- The coverage study is one forgiving family. Its dense random transitions mix quickly: exact backup alone already gives loss 0.010, and the worst-case sampling bound at (8.74 at , 4.37 at ) is far above the measured critic errors. Hard-exploration MDPs are untested, and the reading that loss comes from overwriting unvisited pairs is an interpretation.
- Task loss does not identify the mechanism. A paired actor trained on rewards only had lower loss than the PMD-trained actor in repeated control (median difference −0.005963 [−0.009794, −0.003191]). The loss ratio of 1.052 is a registered usefulness band, and the paired difference to the reference, 0.000177 [−0.000137, 0.000748], establishes neither a disadvantage nor equivalence.
- “No PMD labels” is not discovery. The actor sees no PMD probabilities, but its objective encodes the PMD variational principle. The evidence supports close correspondence, not exact recovery of PMD’s coefficients, and the effective step shrinks towards the middle of the training range (slope 0.743).
- The cause of the low-entropy failures is unknown. Clipping the log-prior input to its training minimum changes little (13.7% of inputs still negative; chosen after looking at the worst row). Masking does not remove them either: 12.8% of the masked actor’s low-entropy inputs still lose value, against 22.7% visible. Learned results are diagnostics, not evidence of a general learned-model failure.
- No benchmark or state-of-the-art claim. The arXiv version compares against adaptations of two published in-context methods under a common harness in which PolicyAttention receives exact model information the others do not; we do not present that as a benchmark result. Later experiments on sparse interaction budgets and on external benchmarks were mixed or exploratory and support no performance claim.
Implementation and reproducibility
- Different checkpoints. The stress screen’s checkpoint was not kept. The matched audit retrained the same configuration and seed; two reruns agree with each other but not with the archive (low-entropy mean 0.0635, maximum 1.9885), so the screen and the audit come from different checkpoints. Repeated control also uses checkpoints other than those of §9’s one-step results.
- Carried, not rerun. The held-out correspondence numbers (0.035741, TD MAE 0.121) and the effective-step sweep are carried from the accepted submission and cannot be replayed from the current repository. A much smaller error reported in an early phase is a deterministic identity check, not a held-out result.
- Smaller than planned. The visible-versus-masked control was cut to 3 seeds at 3,200 steps for runtime. The critic in the stress screen was scored against targets sampled under ideal PMD rather than the returned policy; the matched audit corrects this for one critic call (0.154 against 0.155).
- Protocol records. The coverage protocol was written to a file before the run but is not externally timestamped, and its bound check on realized residuals is an indexing check, since it reuses those residuals.
12Open questions
These come from the papers’ own scope sections and reviewers’ remaining concerns; none has been run.
Part 3 · Technical details
13Definitions and the bound
Take a finite discounted MDP with states, actions, and ; write and for the one-step Bellman operator under . With the ideal update and the actor’s output, the two residuals are
For the greedy set , let , and . Choose (for example ) and set . Then, for a finite horizon ,
There is no term: the returned policy is formed before the backup that would produce . With state and role margins , the actor’s routing error is bounded by
where
and, with leakage masses and at least fresh samples per pair, with probability at least over the horizon,
with the sampling term
A larger lowers the term but raises the routing bound through : the trade-off that §7 makes exact.
14The two-state family
States and loop on themselves, with action rewards and . From a uniform prior and its exact , the query at each state sees all four state–action memories with logits and one-hot action values, and itself with logit and a uniform value. This row is exactly the actor call of the frozen decoder at , up to a common score shift. At , ideal PMD picks the better action with probability , and the wrong-state group, which prefers the other action, has partition ratio
so the sign of the implemented improvement is set by the margin against the step:
The query’s own uniform value lowers the gain but does not move the threshold. A state-local mask removes the wrong-state group (): without the query token the row is exactly PMD; with it, for every .
15Full tables
| Arm | Unvisited pairs | Min. count | Critic error | Loss [95%] | Paired difference to balanced | |
|---|---|---|---|---|---|---|
| 6 | Balanced (oracle) | 0.00 | 6.00 | 0.214 | 0.009 [0.007, 0.013] | – |
| 6 | Uniform pairs | 0.03 | 2.38 | 0.259 | 0.010 [0.006, 0.013] | −0.000 [−0.001, 0.000] |
| 6 | On-policy stream | 3.86 | 0.20 | 1.219 | 0.029 [0.026, 0.032] | +0.018 [0.014, 0.022] |
| 6 | On-policy stream, carry | 4.59 | 0.19 | 1.284 | 0.010 [0.005, 0.012] | −0.001 |
| 6 | Exploring stream | 1.45 | 0.37 | 0.857 | 0.012 [0.010, 0.016] | +0.001 |
| 24 | Balanced (oracle) | 0.00 | 24.00 | 0.106 | 0.009 [0.007, 0.013] | – |
| 24 | On-policy stream | 3.02 | 1.38 | 1.134 | 0.016 [0.014, 0.018] | +0.005 |
| 24 | On-policy stream, carry | 3.59 | 1.37 | 0.938 | 0.010 [0.007, 0.013] | −0.000 |
| 24 | Exploring stream | 0.08 | 3.34 | 0.273 | 0.009 [0.007, 0.012] | −0.000 |
| – | Exact backup (no samples) | – | – | 0.000 | 0.010 [0.007, 0.012] | – |
64 MDPs, , , , , , all margins 16. Unvisited pairs: mean per round, of 12. Critic error: mean per-round against the exact . Loss: median normalized returned-policy loss with a bootstrap interval over MDPs; the difference is the paired median against the balanced arm at the same budget.
| Comparison rule | Mean row-L1 |
|---|---|
| PMD: softmax(log π + ηQ) | 0.035741 |
| Additive projected rule | 0.111635 |
| Prior policy (no update) | 0.239124 |
| Boltzmann over Q | 0.605904 |
| Reward-only rule | 0.607055 |
| Repeated control, round 20 | Loss ratio to reference |
|---|---|
| Run 1 (seed 12100) | 0.978413 |
| Run 2 (seed 12101) | 1.396388 |
| Run 3 (seed 12102) | 1.236607 |
| Run 4 (seed 12103) | 0.918064 |
| Run 5 (seed 12104) | 1.052287 |
Ratio of median normalized losses over 64 held-out MDPs, learned actor over the exact PMD reference at the actor’s fitted step, both with an exact one-step critic. Cross-run median 1.052; paired median difference 0.000177 [−0.000137, 0.000748] (95% hierarchical bootstrap).
| Stress screen (archived) | Actor row-L1, mean | Actor row-L1, max | Critic TD error, mean | Critic TD error, max |
|---|---|---|---|---|
| IID reference | 0.0273 | 0.1676 | 0.1355 | 0.7845 |
| Reward scale ×2 | 0.0512 | 1.2619 | 0.3199 | 1.9377 |
| Bimodal rewards | 0.0395 | 0.5325 | 0.2532 | 1.2943 |
| Sparse transitions | 0.0250 | 0.1671 | 0.1652 | 1.7184 |
| Low policy entropy | 0.0590 | 1.9773 | 0.1623 | 2.3521 |
| High policy entropy | 0.0244 | 0.0579 | 0.0875 | 0.4811 |
512 examples per condition from 8 generated MDPs, . Maxima are over the evaluated sample, not population suprema; critic errors are against six-sample TD targets drawn under ideal PMD.
| Matched audit (retrained) | Row-L1, mean | Row-L1, max | Ideal gain | Implemented gain | Negative | Critic error, mean | Critic error, per-input max |
|---|---|---|---|---|---|---|---|
| IID reference | 0.028 | 0.344 | 0.719 | 0.709 | 0.0% | 0.152 | 0.336 |
| Reward scale ×2 | 0.052 | 1.271 | 1.648 | 1.593 | 0.0% | 0.302 | 0.717 |
| Low policy entropy | 0.076 | 1.992 | 0.158 | 0.144 | 15.4% | 0.154 | 0.373 |
| High policy entropy | 0.022 | 0.085 | 0.672 | 0.654 | 0.0% | 0.103 | 0.251 |
512 inputs per condition. Gains are uniform-state means of under exact evaluation; ideal PMD gain is never negative. Critic error is against , with packets drawn under the returned policy; using a learned instead of an oracle critic in the next actor call changes value by −0.007.
16Reproducibility notes
- Decoder
- Every token coordinate, packet order, matrix and feed-forward weight is listed in the EvoRobust supplement; at the weights have 60 non-zero entries. All 1,803 grid cells replay through the full forward map, and the repository circuit agrees on all weights and actor outputs.
- Exact checks
- Direct softmax and Bellman solves match the partition and error–value identities on the 1,803 grid cells and on 2,928 further checks over reward scale, discount and margin, all to machine precision (errors below 10−14).
- Coverage study
- 64 MDPs drawn once from a fixed seed, uniform starting policy, ; the decoder is the theorem’s own, unchanged.
- Repeated control
- 5 runs of 51,200 steps (seeds 12100–12104), 64 held-out MDPs, 20 rounds, an exact one-step critic for both the learned actors and the reference.
- Tests
- The decoder’s 11 tests pass (shapes, score identity, masked exactness, envelope, critic bound, cross-call silence, feed-forward gate, shared weights, causal mask, witness replay, repository cross-check), as do the repository’s architecture tests.
Summary
17In brief
Design
Policy mirror descent multiplies each action’s probability by the exponential of its value and renormalizes, which is what a softmax does. A small fixed decoder uses one attention row for that step and a second call for TD evaluation, and its errors are carried into a bound on the returned policy.
Results
In the exact decoder, a margin of 8 turns an ideal gain of 2.084 at step 2.4 into an implemented gain of −2.009, and masking other states removes the effect. Trained without PMD labels, a pre-LN Transformer lands within 0.0357 of PMD per row, and five trained actors control within 1.5× of exact PMD.
Open questions
Whether the loop holds up when the critic learns from ordinary trajectories, what learned models’ errors look like inside the loop, and whether the reversal appears in learned models at all. Details are under Limitations and what didn’t work.
18Sources
PolicyAttention: Softmax Attention Implements Policy Mirror Descent for Closed-Loop Control. Yuhe Sui, Yingzhi Tang, Shufang Chen. arXiv 2609.30500, 2026. [arXiv]
Accepted Research
PolicyAttention: Robustness and Failure Modes of Softmax Policy Improvement
PolicyAttention: When Softmax Attention Becomes Policy Improvement
The EvoRobust camera-ready version is titled PolicyAttention: When Stronger Softmax Policy Improvement Backfires. Results come from the camera-ready versions of the two NeurIPS workshop papers and their data, and from the records of the later repeated-control study.