Skip to content

Lexical Reference Frames: Interpreting the Language Model Residual Stream in Its Native SemanticsLexical Reference Frames: Interpreting LM Residual Streams in Native Semantics

Hugging Face Daily Papers· arXiv:2610.22169· Jian Gu, Hongyu Zhang, Chunyang Chen, Aldeida AletiMonash University; Chongqing University; Technical University of MunichIndexed by this site · 2026-10-19· Originally publishedAlignment

Quick read

Interpretability

Based on the paper PDF (AI-generated); refer to the original

The authors propose LEXFRAME, which reads the hidden state with the model's remaining layers; in the middle layers of both models, the LEXFRAME[1] cosine is 0.97 for both.

Questions
The intermediate states do not have the model's own vocabulary semantics, yet early exit, hallucination detection, knowledge editing and distillation all need to read them. The fixed lens does not change with the prefix; the point cloud only describes how the states are distributed.
Methods
LEXFRAME[n] lets the state pass through the model's remaining layers, keeping only n rounds of attention between positions, and replacing the rest with typical attention estimated in closed form from unlabeled text, without fitting the model output. Infinite order is the native frame of reference.
Experiments and results
On WikiText-103 with SmolLM3-3B and OLMo3-7B, the cosine of middle-layer LEXFRAME[1] with the native readout is 0.97 and 0.97; the layer-mean KL is 0.16 and 0.15 nats. Under the confidence readout, early exit can skip 0.45 and 0.42 of the layers.
Limitations and future work
Appendix D leaves early exit, hallucination detection, knowledge editing, and compression matching teacher hidden states for future work. The evaluated models are SmolLM3-3B and OLMo3-7B, and the text is WikiText-103; the early-exit number is the share of layers that can be skipped.
Experimental setupSmolLM3-3B、OLMo3-7B · WikiText-103 · KL散度(nats)、top-token一致率 et al.
Evaluated models
SmolLM3-3BOLMo3-7B
Benchmarks
WikiText-103
Metrics
KL散度(nats)top-token一致率ECE余弦秩相关
AI summaryThe paper proposes Lexical Reference Frames, using the model's own subsequent layers to read hidden states, interpreting the residual stream in the model's native semantics. The authors argue that each hidden state has a native reference frame induced by the subsequent layers that read it, adaptive to context. The method uses the model's own remaining layers to read states, sets several rounds of attention among positions, uses typical attention output for the remaining positions, and does not fit the model output. The authors state that a fixed-direction lens cannot exceed the square root upper bound of native reference frame consistency, which is 0.30 and 0.35 in the middle layers of SmolLM3-3B and OLMo3-7B respectively; the first-order reference frame LexFrame reaches 0.97 and 0.97, with the read states within 0.16 nats of the model output. Its coefficients are more faithful than attribution patching for attribution, the lexical basis can steer a certain prediction without affecting other tokens, and the deterministic readout can let early exit skip 0.45 and 0.42 of the layers.

The paper proposes Lexical Reference Frames, using the model's own subsequent layers to read hidden states, interpreting the residual stream in the model's native semantics. The authors argue that each hidden state has a native reference frame induced by the subsequent layers that read it, adaptive to context. The method uses the model's own remaining layers to read states, sets several rounds of attention among positions, uses typical attention output for the remaining positions, and does not fit the model output. The authors state that a fixed-direction lens cannot exceed the square root upper bound of native reference frame consistency, which is 0.30 and 0.35 in the middle layers of SmolLM3-3B and OLMo3-7B respectively; the first-order reference frame LexFrame reaches 0.97 and 0.97, with the read states within 0.16 nats of the model output. Its coefficients are more faithful than attribution patching for attribution, the lexical basis can steer a certain prediction without affecting other tokens, and the deterministic readout can let early exit skip 0.45 and 0.42 of the layers.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The middle-layer residual stream lacks a context-dependent vocabulary readout, and LEXFRAME approximates it with the remaining layers.

    Middle-layer residual streams lack a context-varying vocabulary readout.

    • Use case: Between input and output tokens, the model only computes and reads/writes the residual stream layer by layer. The authors state that early exit, hallucination detection, knowledge editing, and distillation by matching intermediate states all depend on whether the tools for reading these states are faithful; the meaning is determined by the remaining layers in the prefix context.
    • Existing shortcomings: A lens has one fixed linear mapping per layer, and the readout at the same layer does not change with the prefix. Point-cloud statistics describe the distribution; the authors state that states close in the cloud can still lead to different predictions, and distant ones can lead to the same prediction.
    • The authors' argument: The direction that changes a token's logit is determined by the remaining layers and varies with context, so one mapping per layer cannot follow it. At OLMo3-7B layer 16, the median angle of the logit lens and Jacobian lens relative to the model's lexical readout is 75° and 77° (Figure 1).
    • This paper's approach: These directions are called the lexical reference frame of that state, and the one induced by the full model is called the native reference frame. LEXFRAME[n] reads with the remaining layers and n rounds of inter-position attention, replacing the rest of the attention with typical output estimated on unlabeled text, and does not fit the model output.
  2. What related research exists?

    Related work is grouped into lens, point cloud, and direction; the authors view lens as a frame of reference that ignores context and give an upper bound.

    Related Work is grouped by three questions: which tokens a state represents, how the state of a layer is distributed, and which directions or components drive prediction.

    Language model lens

    • logit lens: nostalgebraist (2020) reads intermediate states with the model's own output frame, and it has been used to study how prediction is refined with depth.
    • One map per layer: tuned lens and others are trained to match the output (Belrose et al., 2023; Din et al., 2023); the Jacobian lens comes from the remaining-layer Jacobian (Hernandez et al., 2023; Gurnee et al., 2026); other work feeds the state into another forward pass (Ghandeharioun et al., 2024; Pal et al., 2023).
    • Fixed anchors and input-output frames: Gu et al. (2026c) uses a set of anchors to measure the states of each layer; Gu et al. (2026b) connects the input frame and the output frame via the pseudoinverse of a shared token memory. The authors view lens as a whole as a frame of reference that ignores context, and give an upper bound on how close they can get to the native frame of reference.

    Point cloud and manifold

    • Distribution statistics: the state of a layer is summarized as inter-layer similarity, intrinsic dimension, effective rank, and anisotropy; other work tracks these quantities along depth and along training.
    • The quantification the authors want to do: the authors want to quantify how much information these statistics reflect about how the model uses the state of a layer.

    Directions and components

    • Probes and steering: linear probes learn directions from labeled states; steering adds a direction to a state to change the output. The authors say both rest on the assumption that concepts are represented as directions.
    • Component contributions: either project what a component wrote onto the output frame, or measure it with patching. The authors say the frame of reference can provide an unsupervised direction for each state, and they test it in steering and attribution at each layer.

    Baselines and data

    • Comparisons: the experiments use logit lens, Jacobian lens, a ridge regression probe of the centered logit on the state, and distances on the point cloud; the text is WikiText-103. tuned lens is omitted, and the authors say it is trained on the model outputs being scored and, like all lens, is subject to the upper bound.

    The authors' positioning is: lens ignores context and is limited by an upper bound; point cloud statistics and how the model uses states are two different questions; the frame of reference gives each state an unsupervised direction in the vocabulary.

  3. How does the paper address this problem?

    LEXFRAME[n] reads the state with the remaining layers and n rounds of attention, and typical attention is estimated in closed form from unlabeled text.

    The lexical frame of reference uses the model's own remaining layers to read the hidden state back into the vocabulary. The native frame of reference is the full transmission; LEXFRAME[n] keeps only n rounds of attention between positions.

    Both ends fixed, the middle adaptive

    Layers are numbered from 1 to L, layer 0 is the embedding. The lexical bases at both ends are fixed for all text: the embedding gives the label a state, and the output end uses the unembedding and the final normalization to get the logit, then subtracts the vocabulary mean. The semantic basis is the state that makes the logit closest to that label's indicator vector under least squares. The paper says prior work used coefficient selection on a fixed output frame to fine-tune layers and transfer knowledge across scales.

    In the middle there is no fixed basis. When the prefix is held unchanged, the transmission sends that state to the last layer. The lexical readout is the gradient of the centered logit with respect to the state, bℓ(v)=Jℓ⊤(wv−w̄). It represents the readout direction of label v at that state, determined by the remaining layers and the final normalization. The coefficient is the inner product the model itself performs after transmission, and gives the next-token distribution. The frame induced by the full model is the native frame of reference.

    Approximations of each order

    • 0th order: no prefix is used. The remaining layers still use the model's own updates, and the attention output is replaced by a typical value: the mean of that layer's attention input and output, plus the ridge regression from input to output. It still varies nonlinearly with the state; what is missing is the information other positions can provide.
    • 1st order: the current position uses this layer's attention to look at the prefix; the prefix states are delivered by 0th order, so what is subtracted is the attention among the prefix thereafter. The difference from 0th order measures this round of attention.
    • 2nd order: prefix positions also attend to each other, and information can reach the current state via one relay. In general, order n attends to order n−1 prefixes, and one read requires running n+1 streams over the remaining layers.
    • Infinite order: no attention is subtracted, and the readout of each layer equals the model output. Order n is exact when the number of remaining layers does not exceed n, so the orders agree near the output.

    Figure 2 and Figure 3 are schematic: the captions say both ends are fixed and the middle depends on context; the order is like the number of hops in message passing.

    Estimation and comparison method

    Typical attention is fitted only once per layer: one forward pass on unlabeled calibration text, closed-form ridge regression; the ridge is chosen by two-fold cross-validation on the calibration sequences over a fixed grid. The frame of reference is not fitted to the model output. The authors say this allows comparison across layers, across checkpoints, and across models, and that agreement with the model is a finding; the more computation that is subtracted, the further from the model, and the more it shows about the state itself.

    Gradients run in the half precision of the released weights. The lexical basis carries a ridge of the same relative scale. The basis test explicitly forms the Jacobian in 32-bit and solves it in closed form; steering uses 30 steps of LSMR without forming the Jacobian. Appendix C counts by number of forward passes: reading all layers and all positions of one sequence at order n takes about (n+1)(L+1)/2 forward passes.

    Upper bound and two coordinates

    Coherence is the average cosine between the unit lexical readout of the same label across different sequence states. The authors' argument is: for a unit vector that does not vary with the state, its average cosine does not exceed the norm of the mean of these readouts, and the square of that norm tends to the coherence over many states, so the average cosine does not exceed the square root of the coherence. The upper bound belongs to the native frame of reference and does not depend on the estimator.

    Coefficients are used to read the stream, bases are used to write, and the coefficient difference attributes a prediction to what a certain layer or sublayer wrote. The authors say that in the middle layers the two are no longer tied together by the same matrix. Steering compares the lexical readout of the logit difference, and the difference of lexical bases.

  4. What experiments did the paper conduct?

    On SmolLM3/OLMo3, middle-layer cosine of LEXFRAME[1] is 0.97/0.97, and layer-mean KL is 0.16/0.15.

    The following paired numbers are all in the order SmolLM3-3B, OLMo3-7B.

    Experimental setup

    • Models: SmolLM3-3B has 36 layers, with input and output embeddings tied; OLMo3-7B has 32 layers, untied. Run at the precision of the released weights. The introduction says they also evaluated on 16 training checkpoints; the paper does not explain how these 16 are divided between the two families.
    • Data: WikiText-103, with the main experiments cut into 128 tokens. Typical attention is estimated on 256 sequences from the training set; measurement uses the test set and covers every layer. The appendix also uses 64 sequences of 1024 tokens.
    • Comparisons: logit lens; Jacobian lens fitted with the reference implementation on 100 prompts, the paper does not explain the source of these prompts; the supervised probe is a ridge regression of the centered logit on the state, fitted on another text, the paper does not explain the source of that text. tuned lens was not run.
    • Metrics: KL of the readout relative to the model output (nats); agreement rate with the model's top token; ECE relative to the true next token (15 bins). Layer averages are unweighted. Appendix A says the average is taken from layer 1 to layer L−1.
    • Samples: the main evaluation is 64 sequences from the test set, a single run. The replacement experiments use 7961 pairs per layer; the basis test uses 64 states and 64 labels per layer; Table 4 uses 512 positions; the attribution reference is 64 sequences. The direction comparison uses 64 labels on the frequency ranking.
    • Early exit and intervals: thresholds are chosen on half the sequences by agreeing with the model at 0.95, then applied to the other half. Appendix A gives 95% quantile bootstrap intervals from at least 300 sequence resamples.

    Main results

    According to Table 1. KL is the divergence relative to the model output (nats), Top-1 is the proportion of states agreeing with the model's top token, and ECE is the calibration error relative to the true next token.

    MethodSmolLM3-3B: KL / Top-1 / ECEOLMo3-7B: KL / Top-1 / ECE
    logit lens29.06 / 0.04 / 0.6325.66 / 0.15 / 0.107
    Jacobian lens7.51 / 0.14 / 0.3766.19 / 0.13 / 0.191
    LEXFRAME[0]0.87 / 0.64 / 0.0180.93 / 0.64 / 0.045
    LEXFRAME[1]0.16 / 0.86 / 0.0270.15 / 0.86 / 0.018
    LEXFRAME[2]0.06 / 0.92 / 0.0200.05 / 0.93 / 0.020
    • The authors say in the Figure 4 caption that each higher order lowers the divergence at almost every layer, and that both lens are several nats higher than all frames until close to the output. In the middle layers, LEXFRAME[1] is 0.04 and 0.05 nats from the model output. The authors say the first round of attention to the prefix removes most of the 0th-order divergence.
    • The authors say transmission through the model's own layers matters more than the fitted map: 0th order does not use more context than lens. For SmolLM3 at the embedding, logit lens reads the input token itself at 0.83 of positions, and OLMo3 at 0.00; the authors say this is because its output frame is also the input frame. A layer skip that connects only to the last four layers, with attention but no transmission, is still 7.00 and 2.59 nats. The authors say the readout needs both transmission and attention.
    • The authors say lens only reach half agreement one or two layers before the output; LEXFRAME[1] gives the model's top token for nine tenths of states starting from layer 18 and layer 17. At the embedding it agrees only at 0.42 and 0.39. The authors say its calibration relative to the true next token is close to the model's own 0.018 and 0.023, and lens probabilities cannot be treated as predictions.

    Direction alignment, training, and early exit

    • Directions: the cosine between the middle-layer native readout and the last layer is 0.07 and 0.26, the cross-context coherence is 0.09 and 0.12, and the lens upper bound given by the authors is 0.30 and 0.35. There LEXFRAME[1] is 0.97 and 0.97; the layer-average cosine is 0.89 and 0.87. The authors say LEXFRAME[2] raises the average cosine to 0.95 and 0.95. The average cosine of lens and probes is between 0.21 and 0.36; in the middle layers Jacobian lens is 0.20 and 0.23, and the authors say it does not exceed the upper bound at any layer. The authors say falling behind is a structural problem, not a fitting problem. The first layer LEXFRAME[1] is only 0.33 and 0.18, and LEXFRAME[2] is 0.56 and 0.44; the authors say that here most of the exchange within the prefix is still further back.
    • Figure 1: median angle every four layers for OLMo3-7B, logit lens is 88°, 87°, 85°, 81°, 75°, 64°, 53°, 40°, 0°; Jacobian lens is n/a at the embedding, then 88°, 86°, 83°, 77°, 67°, 55°, 40°, 0°; LEXFRAME[1] is 82°, 53°, 35°, 22°, 13°, 6°, 3°, 2°, 0°.
    • Training and early exit: from the earliest trained checkpoint to the last, the layer-average KL of logit lens rises from 4.82 to 29.06 nats, and OLMo3 from 2.32 to 5.66; LEXFRAME[1] keeps the top token for at least 0.85 and 0.86 of states at every trained checkpoint. The authors say lens get worse because the middle-layer frame of reference turns away from the output frame, not because the model is harder to read. On a randomly initialized OLMo3, LEXFRAME[1] is 0.11 nats from the output, and logit lens is 0.52 nats. Table 7: LEXFRAME[1] keeps the top token at 0.82 and 0.81 of layers; when the threshold is chosen for 0.95 agreement, it skips 0.45 and 0.42 of layers, and lens at most 0.04. The authors say LEXFRAME[1] does not save computation, because the state still has to be sent through the later layers.

    Point cloud geometry

    • Replacement: the same layer is replaced with the true state from another position, 7961 pairs per layer. In Table 2, the layer-average rank correlation of cloud distance with output change does not exceed 0.28; under LEXFRAME[1] the rank correlation of the divergence of the two states' readouts with that effect is 0.94 and 0.95, and at the embedding it is already 0.64 and 0.66. Geodesic distance is worse than cosine distance. On another disjoint part of the test set, LEXFRAME[1] is still 0.94 and 0.95, and cosine distance is 0.28 and 0.27. The authors say that along a fixed direction lens are at most 0.28.
    • Tangent space: in Figure 5, the share of the squared norm of the lexical readout falling in 64 local principal directions peaks at 9.2% and 2.9%, and random directions are 3.1% and 1.6%. The authors say this is at most about three times random directions, and say the cloud mainly describes variation the remaining layers ignore, and distance still fully counts this variation.

    Coordinates, steering, and attribution

    • Whether the write matches the label: moving the state along the lexical basis by 0.1 of the state norm, the proportion with the largest increase in that label's logit is 0.98 and 1.00 for the LEXFRAME[∞] basis, and 0.56 and 0.79 for its readout (Table 3, layer average). The input frame is 0.42 for SmolLM3 and 0.00 for OLMo3. The authors say this measures a label's direction, not the direction that pushes the output toward that label. Table 4, at what its original text calls the best scale, using this layer's state gives KL of 8.36 and 5.64; the LEXFRAME[1] coefficient is 0.16 and 0.15 nats, and top-token agreement is 0.87 and 0.84 (512 positions). The correlation of the inner product of the readout with this layer's state and the logit is 0.10 and 0.02.
    • Steering: making the second-highest token exceed the current top token, with step sizes from 0.01 to 1 of the state norm. Along the LEXFRAME[∞] basis, clean flips (other token change below 0.1 nats) account for 0.73 and 0.85, and the median change of other tokens when flipping is 0.009 and 0.004 nats (Table 5). The LEXFRAME[1] basis cleanly flips 0.71 and 0.82. At layer 16, the median step size for a LEXFRAME[1] readout is 0.10 and 0.03 of the state norm; the authors say both lens need a ten times larger step. The authors say the readout is the steepest ascent of the logit difference, and the basis disturbs other tokens less.
    • Attribution: removing what a component wrote at one position, 64 sequences, with the logit change measured by a forward pass as reference. The layer-average correlation of the LEXFRAME[1] coefficient difference with the measured effect is 0.88 and 0.90, and that of the LEXFRAME[∞] linear attribution is 0.62 and 0.68 (Table 6; the latter is attribution patching). Both lens are at most 0.20. By position, the median correlation of the coefficient difference with the measured effect is 0.97 and 0.93, and it exceeds both lens at 0.99 and 0.98 of positions. The authors say the remaining layers respond to attention writes almost linearly, and to feedforward writes far beyond first order; the gap of linear attribution is largest at the MLP, 0.88 and 0.90 versus 0.63 and 0.71.

    Other ablations and analyses

    • Lengthening sequences to 1024 tokens: the LEXFRAME[1] layer-average KL is 0.25 and 0.18 nats, and top-token agreement is 0.84 and 0.86; lens are 6.04 nats or higher (Appendix B).
    • Table 8, typical attention with only the mean kept: the LEXFRAME[1] KL is 1.26 and 0.52; when the output is zeroed it is 0.76 and 0.47.
    • Changing calibration to 4 sequences: KL is 0.41 and 0.34 nats; on three disjoint calibration texts it is 0.160–0.163 and 0.146–0.151.
    • Layer skip, connecting to the last four layers, with attention but no transmission: 7.00 and 2.59 nats.
    • The correlation of the inner product of the LEXFRAME[∞] readout with this layer's state and the logit is 0.10 and 0.02.
    • Under half-precision rounding, the divergence of LEXFRAME[∞] from the model output is 0.0009 and 0.0002 nats.
  5. What are some points that can be further explored?

    Appendix D leaves reading states in early exit, detection, editing, and compression as future work.

    Limitations and future directions noted by the authors

    • Future applications: Appendix D writes that early exit, hallucination detection, knowledge editing, and model compression that matches the teacher's hidden states could all read states in the model's frame of reference; the authors expect these uses to benefit, but leave them for future work.
    • No separately listed limitations: the paper has no Limitations section. The Conclusion writes that the middle-layer lens falling behind and the point cloud rarely reflecting usage are explanations of the frame of reference, and does not write any particular setting as a limitation of the method.

    Scope of the experiments

    • The models tested are SmolLM3-3B (36 layers) and OLMo3-7B (32 layers). The introduction says they also evaluated on 16 training checkpoints; Appendix A writes that both families include checkpoints at the end of the late training stage, and OLMo3 also has a randomly initialized model, as well as an early checkpoint at four billion tokens.
    • The text is English WikiText-103. Appendix A writes that the training set is about 103 million tokens, and the test set is about 0.25 million tokens. The main measurement is 128-token sequences, 64 from the test set; the appendix also measures 64 sequences of 1024 tokens.
    • The comparisons include logit lens, Jacobian lens, supervised linear probes, and point cloud distance. Section 4 states that tuned lens is omitted because it is trained on the model output and, like all lens, is subject to the coherence upper bound.
    • Steering is moving a single state so that the second-highest token exceeds the current top token; attribution removes a layer or sublayer write at one position over 64 sequences. Early exit reports the share of layers that can be skipped by a confidence threshold; Appendix B writes that LEXFRAME[1] still sends the state through the later layers, so it does not save computation.
    • The main results are a single run. Appendix A reports 95% quantile bootstrap intervals from at least 300 sequence resamples, and says the half-widths of Tables 1 to 7 are at most 12% of the divergence, 0.004 nats for other token changes in steering, and 0.04 for the remaining quantities.
  6. Summarize the main content of the paper

    LEXFRAME reads hidden states with the remaining layers; the authors state that LEXFRAME[1] keeps up with both models' readout and output from the middle layers onward.

    LEXFRAME uses the remaining layers to read residual-stream hidden states back into the vocabulary.

    • Embedding and unembedding only specify word meaning at the two ends. If intermediate states use a lens with one mapping per layer, they do not vary with the prefix; if only the point cloud is examined, the states are not read. The authors care about the readout that early exit, hallucination detection, knowledge editing, and intermediate-state matching depend on.
    • LEXFRAME[n] still lets the state pass through the remaining layers, keeping only n rounds of inter-position attention and replacing the rest with typical attention estimated once from unlabeled text, without fitting the model output. The infinite-order readout equals the model output. The authors give: for a lens with one direction per layer, the mean cosine does not exceed the square root of the native readout's coherence.
    • On SmolLM3-3B and OLMo3-7B, WikiText-103, the cosine of middle-layer LEXFRAME[1] with the native readout is 0.97 and 0.97, where the upper bound is 0.30 and 0.35. The layer-mean KL is 0.16 and 0.15 nats, and the top-token agreement rate is 0.86 and 0.86 (Table 1).
    • When the threshold is chosen for 0.95 agreement with the model, LEXFRAME[1] corresponds to skipping 0.45 and 0.42 of the layers, and the lens at most 0.04 (Table 7). The rank correlation of cloud distance with the state-replacement effect is at most 0.28, and for LEXFRAME[1] is 0.94 and 0.95 (Table 2).
    • The clean flips of the LEXFRAME[∞] lexical basis account for 0.73 and 0.85 (Table 5). The coefficient difference of LEXFRAME[1] correlates 0.88 and 0.90 with the logit change after removing the component, and linear attribution patching 0.62 and 0.68 (Table 6).
    • The authors' conclusion is: to interpret a state, one should pass through the remaining layers, carry the context it sees, and use the model's own vocabulary semantics. They expect this readout to replace the lens in the above applications, and leave these uses for later.
Read originalhuggingface.co