RoPE attention is an exact forward-pass gradient step with softmax intact
Abstract
We derive an exact gradient-step representation of the RoPE-softmax forward pass. For every deterministic RoPE-softmax attention head with arbitrary affine projection weights, we construct a query-dependent effective matrix satisfying , where is the uniform mean of the attended values and is the augmented query input. The construction applies the classical exponential divided difference to retain the softmax exactly. Its positive coefficients give a unit gradient-step representation on a query-conditioned quadratic objective. The same function connects the RoPE generator to exact positional finite differences. We derive a tokenwise formula for the error of reusing one query's matrix and prove that a nonconstant finite-cache head cannot admit a globally exact affine query readout. Reconstruction checks and frozen-reuse calibration on one pretrained Qwen2.5-0.5B layer verify the representation and quantify the correction required when one query's matrix is reused.
Create a lesson
Related papers
Exact Finite Attention Responses From RoPE Derivatives
Shared title terminology · Julie Huang, Maggie Chlon, Gregory Gutin et al.
Exact Bayesian layers via characteristic functions
Shared title terminology · William H. W. Thompson, Guillaume St-Onge, Laurent Hébert-Dufresne et al.
A Free Lunch: Gradient Averaging Achieves Optimal Statistical Efficiency in Newton Sketch
Shared title terminology · Haoxuan Wang, Jianliang Ye, Sen Na
The Limits of Closed-Form Couplings for Few-Step Generation
Shared title terminology · Tobias Höppe, Stefan Bauer, Qiang Liu et al.
Group-Conditional Conformal Risk Control: Exact Guarantees, Limits, and Overlapping Extensions
Shared title terminology · Tareq Aldirawi, Wenge Guo
On the Gradient Heterogeneity Dynamics of Adversarially Robust Federated Regression
Shared title terminology · Leonardo F. Toso, James Anderson, Nirupam Gupta et al.