Skip to content

RoPE attention is an exact forward-pass gradient step with softmax intact

Sep 2026 · 0 citations · 9 references
Mathematics Computer Science

TL;DR

A tokenwise formula for the error of reusing one query's matrix is derived and it is proved that a nonconstant finite-cache head cannot admit a globally exact affine query readout.

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 $\Delta M_i$ satisfying $y_i = \mu_i + u_i^\top \Delta M_i$, where $\mu_i$ is the uniform mean of the attended values and $u_i$ is the augmented query input. The construction applies the classical exponential divided difference $\rho = \phi_1$ 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.

View source

Similar papers

#machine learning Preprint Sep 2026

Exact Finite Attention Responses From RoPE Derivatives

This work derives exact local responses for attention interventions, allowing candidate edits to be scored from a cached baseline and one backward pass, and yields an exact query-conditioned gradient-step representation whose curvature identifies attention-preserving query directions, and minimum-norm query control.

Julie Huang, Maggie Chlon, G. Gutin et al. · 1 citation
#machine learning Preprint Sep 2026

The Head Complexity of Boolean Functions in Single-Layer Attention

A compactness theorem shows that any function computable at all can be computed with embedding dimension and precision bounded by the discrete data of the task, namely, head count, alphabet size, and length.

R. Rajaraman, Ravi Sundaram, Amanuel Tesfaye · 1 citation
Preprint Aug 2026

Toward a First-Principles Update Geometry for the Language-Model Head

Muon motivates designing optimizer geometry around the function of each parameter block and uses the spectral norm for hidden linear layers. For the language-model head, the spectral norm is not a faithful measure of functional change. Softmax removes shared logit shifts, whereas the spectral norm can assign arbitraril...

Aditya Somasundaram, Charles Guille-Escuret, Alexander Moreno et al. · 0 citations
#machine learning Preprint Oct 2026

Learning Decision-Stump Thresholds in Context: Dynamics of Softmax Attention

Estimating a decision threshold requires locating observations near an unknown boundary. We study how gradient-based pretraining learns this statistical rule in a two-parameter softmax-attention model with a fixed feature and inequality direction. Pretraining uses labeled contexts and their true thresholds; a fresh thr...

H. Lệ, Jackie Lok, Atsushi Nitanda et al. · 0 citations

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.