WorksComputer Science
Following the Error Through a Compressed Network:An Angular Measure for FFN Weight Compression in ViT-L/16
Abstract
We study the compression of the 48 feed-forward network (FFN) matrices of the Vision Transformer ViT-L/16 to 2–8 bits with four schemes: a per-token grid, a fixed Gaussian Lloyd–Max table, a table fitted to the matrix, and a random-sign Hadamard rotation followed by the fixed table. We evaluate on 50,000 images. At 4 bits the top-1 accuracy of the four schemes lies within 0.8 points of the float32 model, while the agreement with its predictions ranges from 98.4% to 94.4%. We use the angular error between the compressed and the float32 residual stream, followed through the blocks, as a portable measure that ranks the schemes as the final classification does and shows where the ranking is built: with rotation the angle grows close to the square root of the number of blocks, the signature of independently accumulating errors, while the other schemes are amplified in the later blocks. The same measure shows that a scheme that is better on one block in isolation can be worse in the whole network. To address this inconsistency we introduce an angular measure of the spectrum of the output of a block, which in isolation orders the schemes as the whole network does where they diverge most. We support these observations with real samples and with statistically generated ones. The scope is one model, the FFN weights only, and float evaluation of compressed weights; no speed-up is claimed. The error measures and the sample generation, however, can be applied to other models and precisions.
Introduction
The feed-forward network (FFN) matrices hold most of the parameters of a Vision Transformer (ViT). In ViT-L/16 the 48 matrices (fc1: and fc2: in each of 24 blocks) hold 201 of its 304 million parameters. Compressing them to a few bits per weight reduces storage and traffic, and the question this paper asks is how to compare compression schemes, not which one to build.
Three habits are common, and each can mislead. The first compares the error made on the weights, how far each compressed weight vector is from the original. On this model a table fitted to the matrix is closer to the weights than a plain per-token grid, yet the compressed network is closer to the original with the grid. The second compares top-1 accuracy on a sample. At 4 bits, on 50,000 validation images, four schemes differ from the float32 model by 0.15 to 0.78 points of top-1, but behind this small gap in the total hides a large movement of labels: 802 to 2,792 images change their predicted class, some are negative flips (right before, wrong now, which we call broken) and some positive flips (wrong before, right now, fixed), and the two nearly cancel in the accuracy. On a sample of 5,000 images the order of their top-1 is the reverse of the order of the damage. The third compresses one block at a time and keeps the scheme that is best there. In our data the preference measured on one block does not survive when all blocks are compressed.
We use instead measures that each answer one intuitive question. The angle between the compressed and the float32 residual stream after each block, per token, says how far compression has turned the token, that is, the embedding, away from where it should point; since a transformer reads direction much more than length, a turn is the damage that matters, and turns of independent errors add up in a way we can predict. The agreement with the float32 prediction says how often the compressed network still says the same thing as the original, right or wrong. The Kullback–Leibler (KL) divergence of the output distribution says how much the network’s confidence has moved, even when its answer has not. The swing says who pays for a small change in accuracy: the images whose class changes, negative flips (broken: right before, wrong now) and positive flips (fixed: wrong before, right now), which can cancel in the accuracy and not in the damage. Inside one matrix, the span of the output (the leading eigenvectors of its second-moment matrix, where the output keeps its energy) says whether compression has kept the eigenvectors that carry the signal, or has bent or shrunk them; losing a direction is the damage that no later block can repair. The same angular idea measures the weights (Section 3), so one kind of quantity connects the weight, the stream and the output.
Contributions. (i) A measure and a protocol: the stream angle followed through the blocks, evaluated on named samples of 100 to 50,000 images with paired intervals, and the swing of the classification, its negative and positive flips. (ii) The error flow: with rotation the stream angle grows as the square root of the number of blocks at every width from 8 to 2 bits (exponents 0.43 to 0.53), the signature of independent errors, and the crop schemes rise above this line in the later blocks. (iii) Isolation and context: the error that arrives at a block is four to five times what the block adds, the order of two schemes measured on single blocks reverses in the whole network, and the gap between them arises in fc2. (iv) The span: a spectrum angle and other measures of the output of a matrix show where a scheme loses energy, and order the schemes in isolation as the whole network does where they diverge most. (v) Generated inputs: from 500 images a bulk and one hot eigenvector reproduce the span measures of the real inputs on held-out images. (vi) A sweep of four schemes at 8, 6, 5, 4, 3 and 2 bits, and a confirmation on 50,000 images at 4 bits.
Scope. One model (ViT-L/16, the augreg_in21k_ft_in1k checkpoint), the FFN weights only, one random sign seed for the rotation, and float32 evaluation: the compressed weights are decoded to float before the multiply, so we measure the effect of the representation, not of a kernel. We report no run time. The rotation costs a Hadamard transform of the activations at each FFN matrix, which we do not measure here.
Section 2 places the work, Section 3 defines the objects and measures, Section 4 the schemes, Section 5 the span, as an error measure in context and as a generator of tokens, Section 6 states the observations as testable statements, and Section 7 gives the results. Section 8 lists the limits.
Related work
Rotation before rounding. Multiplying the weights and the activations by an orthogonal matrix before quantization spreads outliers over the coordinates; it is used with randomized Hadamard transforms or learned rotations in recent work on language models [2, 1, 9]. We use a fixed random-sign Hadamard rotation and do not propose a new one; we ask what the rotation does to the error through the blocks of the network. Data-aware weight quantization. GPTQ and AWQ use calibration data to choose the rounding or the scales [7, 8]. Our schemes use no data (information levels 0 to 2, § 4); data would be a further level. Non-uniform formats. Lloyd–Max quantizers [10, 11] minimize the mean squared error for a density; fixed non-uniform tables are used in 4-bit formats for language-model weights [5]. We use the same construction for a Gaussian table solved once and for a table fitted to a matrix. Models. The network is a vision transformer [6] in the augmented-regularized training recipe [13].
The contribution here is not a quantizer. It is the measure (the angle followed through the network), the protocol (paired intervals on named samples, the swing), and what they show about isolation, accumulation and localization. The angular error and the statistical treatment of the compression error, with ablation and validation on samples, were developed for the compression of the key–value cache [4, 3]; here we apply the same machinery to the weights of a public model, and extend it from one layer to the error that flows through the whole network.
Notation and definitions
We fix the vocabulary used in the rest of the paper: the block and its parts, what we call an outlier, the two kinds of angle, the classification measures, and the samples on which they are computed.
A block of ViT-L/16 maps the residual stream to :
where is layer normalization, with and the mean and the standard deviation of the 1024 entries of the token and with a learned scale and shift ; the two layer normalizations of a block are the same operation with their own parameters and , and every block has its own. GELU is the Gaussian error linear unit, a smooth activation that suppresses most negative values, and with (fc1) and (fc2), stored as [out, in]. Only and are compressed; attention, embeddings, norms and the head stay in float32.
Two kinds of token appear. The network cuts an image into patches of pixels and adds one class token; each of these 197 positions is a vector of 1,024 numbers that the blocks update, and we call it an activation token. A weight token is one row of a weight matrix, that is, the weight vector of one output channel ( for fc1, 4096 for fc2). We place a weight token on the sphere, , so that its root mean square is 1; we call the sigma of the token (a root mean square, with no mean subtracted), measure coordinates in sigma units, , and store the norm separately.
An outlier is a coordinate of a weight token whose magnitude (its absolute value) in sigma units is far larger than that of the other coordinates of the token. Counting the coordinates beyond a threshold is one measure (§ 7); the largest coordinates of the 48 matrices reach 10 to 37 sigma, where the largest coordinate of a Gaussian matrix of the same shape would reach about 5.5. By extension we also call a weight token that contains outlier coordinates an outlier token (in the results, a heavy row), and the positions of those coordinates its outlier columns. We use a second, functional definition: an outlier is a coordinate that spends bits on range rather than on precision. A rotation does not remove it; it spreads its energy over all coordinates, so that fewer bits cover the range and more coordinates carry the same information.
The angle between two vectors and is . For a weight token and its compressed copy the weight angle is . The weight angle measures how far compression has turned the token. Any orthogonal transformation, such as a rotation, preserves angles.
Take the first block and a token of its input . The block turns into the token of ; the compressed block turns the same into . The stream angle is : how far compression has turned the output token. Each token is first centred, that is, the mean of its 1,024 numbers is subtracted. We do this because layer normalization is invariant to a constant added to all the numbers of a token: it subtracts the mean itself, so the next layer cannot see such a shift. For a later block the compressed network has also compressed the blocks before it, so and are the tokens of in the float32 and in the compressed network, and contains the error accumulated so far. We report the median (and the 99th percentile) over tokens.
If every block adds an independent error of similar size, the errors add like random steps, in quadrature, so after compressed blocks the median angle grows as for small angles. We fit and call the growth exponent: near means independent accumulation, and a larger means that later blocks amplify the error.
For an image, the logit angle is , where and are the 1,000 logits of the float32 and of the compressed network, each centred by removing a constant, its mean; the softmax cannot see such a constant. We could compare the probabilities directly, with a cross entropy (we also report the Kullback–Leibler divergence of the output), but the angle is a measure common to the weights, the stream and the logits.
Agreement is the share of images with the same predicted class as the float32 network. Top-1 and top-5 are the usual accuracies. KL is the divergence of the compressed softmax from the float32 one. The swing counts the images whose class changed, among them those the float32 network classified correctly and the compressed one does not (a negative flip, which we also call broken), and the reverse (a positive flip, fixed) [14]; the two counts are the discordant pairs of McNemar’s test [12]. The top-1 change is fixed minus broken, over the sample; it can be near zero while many images change.
The validation images are taken in file order. A sample is named by its number of images and the number of classes it covers (Table 1).
| sample | selection | images | classes covered | used for |
| 100-93 | every 500th image | 100 | 93 | checking the scaffolding |
| 500-401 | every 100th image | 500 | 401 | per-token flow runs, swap tests, local analysis |
| 5000-995 | every 10th image | 5,000 | 995 | exploration |
| 50000-1000 | all images | 50,000 | 1,000 | confirmation |
Table 1. The samples. Only the full validation set is balanced across classes.
The float32 network has top-1 85.84% and top-5 97.82% on 50000-1000 (85.86% top-1 on 5000-995). All evaluation uses batch size 10; the noise floor of the logits between runs is about . Intervals are 95% bootstrap intervals over images (2,000 resamples). The same resamples are used for every arm, so a difference between two schemes is a paired difference.
Compression schemes and their assumptions
We study the effect of four compressions of a weight token to bits per coordinate: a uniform grid, as in an integer representation; Lloyd–Max tables, which minimize the mean squared error (one fixed table for Gaussian coordinates and one fitted to the matrix); and a Hadamard rotation, which spreads the outliers over all coordinates, combined with the fixed table. In each, a coordinate is replaced by the index of one of levels and the token keeps one scale chosen by least squares. We rank them by what the encoder must know about the weights, the information level: level 0 nothing, level 1 the token itself, level 2 the distribution of the whole matrix, and level 3 data, such as calibration inputs of the layer, whose covariance an encoder could use. We stay at levels 0 to 2.
Crop with a grid (Grid-crop). A weight token is clipped to an interval , with its sigma (the root mean square), that is, to on the sphere of radius where the token has sigma 1; the grid is the equally spaced levels of an integer representation, one of which is zero, with the largest level at ; each coordinate takes the nearest level. The interval is chosen per token, from candidates of 1 sigma upward, as the one with the smallest weight angle, and the token keeps the least-squares scale. It assumes nothing about the distribution of the coordinates and needs the token itself (information level 1).
Lloyd–Max tables. A Lloyd–Max quantizer chooses levels and thresholds that minimize the mean squared error under a density; the levels are the conditional means of the cells [10, 11]. StaticLM-crop uses the table of the standard normal, solved once for each width, on the normalized token: it assumes Gaussian coordinates and needs nothing about the weights (level 0). FitLM-crop fits the table to the pooled coordinates of the matrix itself (level 2): it replaces the Gaussian assumption by the empirical density, at the price of using the weights to build the table. The fit iterates until the relative decrease of the distortion is below , with a cap of 10,000 iterations.
Rotation. Let be the Walsh–Hadamard matrix scaled by and a vector of random signs; the transform , where is the element-wise product, is orthogonal. Since , we compress the rows of and apply to the activation at run time. We expect a random rotation to send a token to a point close to uniform on the sphere; its coordinates then follow a beta distribution (scaled) and, as grows, a Gaussian. The random-sign Hadamard transform is a cheap approximation of such a rotation, and we test the Gaussian expectation (§ 7). The cost is a transform of length per activation token ( additions for or 4096), and the sign vector.
Rotation with the fixed table (StaticLM-rot). We rotate the weight token with and quantize it with the StaticLM-crop table.
| scheme | quantizer | information about the weights |
| Grid-crop | uniform grid, per-token clip | the token (level 1) |
| StaticLM-crop | Lloyd–Max | none (level 0) |
| FitLM-crop | fitted Lloyd–Max | the matrix (level 2) |
| StaticLM-rot | Lloyd–Max after rotation | none (level 0) |
Table 2. The four schemes. Information levels: 0 nothing about the weights, 1 the token, 2 the distribution of the matrix, 3 data.
The bit width counts the indices only; the per-token scale (and, for the grid, the clip) is side information of the order of 1/64 bit per weight if stored in 16 bits per token of 1,024 weights.
The span: an error measure in context and a generator of tokens
To see how the coordinates of a set of tokens relate to each other we look at their empirical covariance, a matrix; if the coordinates were independent Gaussians it would be diagonal. We keep the mean in it, which makes it a second moment: the energy of the tokens. An eigenvalue and eigenvector analysis of this matrix shows the eigenvectors that carry the energy and, by their eigenvalues, how much each carries; the span is the subspace of the leading eigenvectors, and its dimension is the number of directions that matter. We use it in two ways. First, as an error measure that depends on the context: the output of a matrix lives in a span, and compression can shrink it, tilt it or lose part of it; it measures the error where the inputs put the energy (§ 5.1, Table 3). Second, to generate tokens: the covariance describes how the tokens of a small sample are related to each other, and a description of a few numbers lets us generate new tokens that keep what matters, so that a small sample generalizes (§ 5.2).
| measure | needs | sees |
| weight angle | the matrix and its copy | the weight in the isotropic metric |
| branch angle (median over tokens) | the matrix, its copy, an input sample | the typical token |
| span measures | the matrix, its copy, the second moment of the inputs | the leading eigenvectors and the whole spectrum |
| stream angle | the network, compressed and float32 | what arrives from the other blocks |
| agreement, KL, swing | the whole network and a sample | the end result |
Table 3. The measures compared. The span measures sit between the weight and the stream.
The span as an error measure
Take fc2 of one block, , and its compressed copy . Let be a sample of its inputs (the GELU outputs of activation tokens), the output signal, the compressed output and the error. The second-moment matrices are and with , so every measure below depends on the sample only through . Write with ; the span of the output is the subspace of the eigenvectors with the largest eigenvalues : where the output has its energy. Four measures describe it. The spectrum angle is the angle between the two spectra taken as vectors, , with the eigenvalues of and : the eigenvalues are ordered, so no eigenvectors have to be matched and the number does not depend on which channels hold the energy. It is zero when the compressed output keeps the shape of the spectrum, and it turns when energy is lost where the signal has most of it. The spectrum distance is a second form of the same comparison, which also counts a uniform change of scale. The dominant gain is the variance kept along the dominant eigenvector; if along , with the part not proportional to the signal, then and the error energy along it is , so a small with a large error is a contraction. The in-span share is the part of the compressed output that still lives where the signal lived (by Ky Fan’s maximum principle the denominator is the most any -dimensional subspace can hold). The error in the span is the share of that falls along the top 8 eigenvectors of , together with the error relative to the signal along each eigenvector, . All four are eigenvalues or traces of matrices; none needs a network run or a label. They avoid subspace angles on purpose: eigenvectors are poorly estimated from a small sample, and we saw the same difficulty (the principal angle between the two top-8 subspaces is 17° for the rotation, whose error is of the signal, because the cut splits near-degenerate eigenvectors).
The span for the generalization of token samples
The span carries what matters of a set of tokens, so from a small sample we can extrapolate it and rebuild a clone of the inputs of a block: tokens that satisfy the same basic requirements as the real ones. From a small sample of real tokens at the input of the feed-forward part of a block2 we estimate by a fixed rule the span of the standardized tokens and how the tokens load on it. Most tokens form a bulk, Gaussian with the mean and the covariance of the typical tokens (the covariance turns out to be optional, the mean is not). A few tokens are hot: they load on one hot eigenvector , the first eigenvector of the second moment of the standardized tokens with the largest energy (the top 1%), with its sign fixed positive. The hot share is the fraction of tokens whose projection on exceeds three standard deviations of the others’ projections, and the amplitude of the load is a log-normal fitted to the projections of the hot tokens. A hot token is with a bulk token orthogonalized to and scaled to norm and the amplitude over , then standardized. The description is (about six channels), , two amplitude numbers and the mean: about ten numbers.
Observations and findings
| observation | measurement | status |
| O1a | Kolmogorov–Smirnov | fc2 0/24 rejected, fc1 20/24 rejected |
| O1b : | weight angle | fc2: true (median 5.57°, no token above 6.3°); fc1: only the median (5.52°, tokens up to 7.7°) |
| O2 The unrotated weight tokens have heavy tails, and the Lloyd–Max schemes (StaticLM-crop and FitLM-crop) lose to Grid-crop in the tail. | 99th percentile of the weight angle, 8 bits | FitLM-crop 48/48, StaticLM-crop 45/48 |
Table 4. Observations, the test that could refute each, and the status.
| observation | measurement | status | |
| O3 | Spearman correlation of the stream angle after the last block, the logit angle and the KL divergence | rank correlation over the schemes and the widths | stream–logit 0.988, stream–KL 0.997, logit–KL 0.990; within one width 1.00 at 8, 6 and 4 bits, 0.80 at 2 bits |
| O4 | top-1 and the share of changed images, at 4 bits | 95% intervals, per scheme and per sample | top-1: intervals overlap in 6/6 pairs of schemes on 5000-995 and on 50000-1000; changed share: disjoint in 5/6 and 6/6 pairs, the same on both samples for every scheme |
| O5 | rotation: independent errors, | exponent of | rotation to at 8, 6, 4 and 2 bits; the crop schemes rise above it at 6 and 4 bits, Grid-crop not at 8 and 2 bits |
| O6 | , and does not depend on the input | median angle at the end of block 20: arriving, and added by the block with the clean and with the in-context input | arriving , added to ; the added error changes by at most 3% with the input |
| O7 | FitLM-crop Grid-crop alone, in all 48 matrices | logit angle, 4 bits | in 4 of 4 blocks; |
| O8 | the gap in between all FitLM-crop and all Grid-crop () arises in fc2 | FitLM-crop swapped into fc1 or fc2 of blocks 8–15 of the Grid-crop network | fc2 , fc1 |
| O9 | the sensitivity of a block in isolation at low bits locates the blocks that matter in context | overlap of the top 5 blocks, isolation and context | StaticLM-rot 2 bits 4/5, Grid-crop 3 bits 5/5, FitLM-crop 8 bits 4/5; FitLM-crop and StaticLM-crop 4 bits 1/5 |
| O10 | from 500 images and their eigen factors we reproduce the span measures of the real inputs | Spearman correlation of the span measures, real against generated, over scheme-by-measure pairs | blocks 11–14: 0.98 to 1.00; block 17: 0.98 with the mean, 0.60 without |
Table 1 (PDF p. 8).
Results
We follow the error from the weights to the classification and through the blocks of the network (the weights, classification, the error flow), then into single blocks (isolation and context, the span of fc2, its trigger, the input scheme), and end with mixed policies.
The weights
After a random-sign Hadamard rotation the coordinates of the weight tokens are Gaussian in fc2 and closer to Gaussian in fc1 (O1a); the unrotated tokens have heavy tails, the largest coordinate of a matrix being 10 to 37 sigma (O2). For a Gaussian token a table with relative squared error (after the best scale of the compressed token) turns it by , which is at 4 bits (O1b). Table 5 and Table 6 give the weight angle at 4 and 8 bits.
| 4 bits, median angle () | StaticLM-rot | Grid-crop | FitLM-crop | StaticLM-crop |
| fc1 (median over 24 blocks) | 5.52 | 6.33 | 5.67 | 5.62 |
| fc2 (median over 24 blocks) | 5.57 | 7.01 | 6.13 | 6.24 |
Table 5. Weight angle at 4 bits.
| 8 bits, over the 48 matrices | median | 99th pct | max | smallest norm ratio |
| Grid-crop | 0.52 | 1.41 | 3.12 | 0.997 |
| FitLM-crop | 0.50 | 2.50 | 10.96 | 0.881 |
| StaticLM-crop | 0.38 | 8.50 | 28.42 | 0.680 |
| StaticLM-rot | 0.36 | 0.42 | 0.74 | 0.999 |
Table 6. Weight angle (degrees) at 8 bits: median over the matrices of the per-matrix median, 99th percentile and maximum over tokens, and the smallest ratio .
Classification
Table 7 gives the sweep on 5,000 images and Table 8 the result at 4 bits on 50,000. The rotation is the closest to float32 at every width; the agreement falls gently from 8 to 4 bits and steeply below 3 bits, and the logit angle of the rotation grows by a factor of 1.98 to 1.99 per bit from 8 to 3 bits, as a weight distortion that falls by four per bit would give (O3). At 4 bits FitLM-crop is below Grid-crop by −1.23 [−1.40, −1.07] points of agreement and −0.30 [−0.44, −0.15] of top-1 (paired, 50,000 images). The intervals of top-1 overlap for every pair of schemes on both samples, while the share of images that change class is 1.6, 3.1, 4.4 and 5.2 to 5.6% and is the same on both (O4).
| 8 | 6 | 5 | 4 | 3 | 2 bits | ||
| agreement (%) | StaticLM-rot | 99.92 | 99.56 | 98.92 | 98.44 | 96.70 | 92.22 |
| Grid-crop | 99.78 | 99.28 | 98.24 | 96.90 | 94.18 | 82.34 | |
| FitLM-crop | 99.40 | 98.90 | 97.82 | 95.64 | 93.34 | 85.68 | |
| StaticLM-crop | 96.78 | 95.82 | 95.62 | 94.76 | 92.56 | 83.52 | |
| logit angle () | StaticLM-rot | 0.23 | 0.90 | 1.79 | 3.54 | 7.02 | 15.37 |
| Grid-crop | 0.45 | 2.09 | 4.60 | 9.41 | 15.12 | 28.46 | |
| FitLM-crop | 1.89 | 2.78 | 5.87 | 16.45 | 21.75 | 30.79 | |
| StaticLM-crop | 11.48 | 14.50 | 16.74 | 19.24 | 23.29 | 32.04 | |
| mean KL | StaticLM-rot | 0.0000 | 0.0003 | 0.0011 | 0.0044 | 0.0182 | 0.1087 |
| Grid-crop | 0.0001 | 0.0011 | 0.0074 | 0.0267 | 0.0698 | 0.4574 | |
| FitLM-crop | 0.0007 | 0.0015 | 0.0076 | 0.0559 | 0.1127 | 0.4581 | |
| StaticLM-crop | 0.0326 | 0.0448 | 0.0573 | 0.0772 | 0.1377 | 0.5404 |
Table 7. Sweep on 5,000 images, all 48 FFN matrices compressed.
| agreement (%) | top-1 | top-5 | changed / broken / fixed | logit angle | KL | |
| float32 | – | 85.84 | 97.82 | – | – | – |
| StaticLM-rot | 98.40 [98.29, 98.51] | 85.69 | 97.83 | 802 / 320 / 244 | 3.54 | 0.0041 |
| Grid-crop | 96.84 [96.69, 96.99] | 85.59 | 97.73 | 1580 / 623 / 501 | 9.35 | 0.0264 |
| FitLM-crop | 95.61 [95.44, 95.80] | 85.29 | 97.64 | 2193 / 923 / 650 | 16.49 | 0.0556 |
| StaticLM-crop | 94.42 [94.22, 94.62] | 85.06 | 97.56 | 2792 / 1200 / 812 | 19.27 | 0.0775 |
Table 8. 4 bits, 50,000 validation images, all 48 matrices.
The error flow
Figure 1 shows the median stream angle after each block at 4 bits and Figure 2 the spectrum angle of the stream; the other widths are in Appendix A. Table 9 gives the growth exponents. The rotation follows at every width (O5) and the crop schemes rise above it in the later blocks. The spectrum angle is not cumulative: it rises where a scheme loses energy (after the 12th to the 14th block, that is blocks 11 to 13, for the Lloyd–Max schemes at 4 bits) and falls back in the later blocks, while the stream angle keeps growing.

Figure 1. Median angle of the residual stream against the number of blocks, 4 bits, 5,000 images. Left: log–log with the line. Right: the angle divided by .

Figure 2. Spectrum angle of the residual stream against the number of blocks, 4 bits, 500-401 (98,500 tokens): the angle between the first 32 eigenvalues of the second moment of the stream, compressed against float32. Left: log scale. Right: linear.
| 8 | 6 | 4 | 2 bits | ||
| exponent (all / late) | StaticLM-rot | 0.53 / 0.54 | 0.53 / 0.53 | 0.51 / 0.49 | 0.43 / 0.29 |
| Grid-crop | 0.48 / 0.43 | 0.51 / 0.73 | 0.42 / 0.67 | 0.37 / 0.13 | |
| FitLM-crop | 0.75 / 1.64 | 0.61 / 1.14 | 0.62 / 1.14 | 0.46 / 0.49 | |
| StaticLM-crop | 0.63 / 1.34 | 0.61 / 1.11 | 0.53 / 0.77 | 0.42 / 0.45 | |
| angle after block 24 () | StaticLM-rot | 0.52 | 2.02 | 7.85 | 32.27 |
| Grid-crop | 0.94 | 4.63 | 17.88 | 52.50 | |
| FitLM-crop | 3.99 | 5.30 | 24.62 | 51.34 | |
| StaticLM-crop | 19.10 | 22.13 | 28.50 | 53.04 |
Table 9. Growth exponents (over all 24 blocks, and over blocks 13–24) and the final stream angle, 5,000 images.
Isolation and context
Compressed alone, the fitted table is as good as or better than the grid in blocks 0, 1, 20 and 21; in all 48 matrices it is worse (O7). The error that arrives at block 20 is four to five times the error the block adds, and the error the block adds hardly depends on its input (Table 10, O6). Swapping the fitted table into the grid network puts the gap in fc2 (Table 11, O8). The sensitivity of a block in isolation locates the blocks that matter in context for a mild error, and not for the table schemes at 4 bits (O9): isolation points to blocks 23, 22, 11, 21 and 0, context to blocks 11, 12, 13, 17 and 14.
| median angle at the end of block 20 () | StaticLM-rot | Grid-crop | FitLM-crop |
| local error, clean input | 2.19 | 2.88 | 2.45 |
| local error, in-context input | 2.11 | 2.90 | 2.49 |
| total error (arriving + local) | 12.33 | 12.63 | 12.57 |
Table 10. Block 20 at 4 bits, 500 images. The error that arrives from the blocks before is .
| network (4 bits, 500 images) | angle after block 23 (°) |
| all GRID-CROP | 17.87 |
| all FITLM-CROP | 24.75 |
| GRID-CROP with FITLM-CROP in blocks 0–7 / 8–15 / 16–21 | 17.88 / 22.21 / 18.41 |
| GRID-CROP with FITLM-CROP in blocks 22–23 | 18.83 |
| GRID-CROP with FITLM-CROP in fc1 / fc2 of blocks 8–15 | 18.05 / 22.06 |
| FITLM-CROP with GRID-CROP in blocks 0–7 / 8–15 / 16–21 | 24.73 / 19.57 / 22.86 |
| FITLM-CROP with GRID-CROP in blocks 22–23 | 23.77 |
| FITLM-CROP with GRID-CROP in fc1 / fc2 of blocks 8–15 | 24.66 / 19.67 |
Table 11. Swap tests: median stream angle after the last block.
The error of fc2 in the span of its output
Table 12 gives the span measures of § 5.1 for fc2 of blocks 11 and 17, compressed alone, at 4 bits. At block 11 the fitted table loses the dominant eigenvector of the output (), made of the stream channels 681 and 724, rows of with coordinates of 22 to 27 sigma: the weight angle of these rows is 1.5 times the grid’s and the output error 400 times. The spectrum angle orders the schemes as the end of the flow does, the median branch angle does not. At block 17 both crop schemes lose the dominant eigenvector (spectrum angle 25.6 and 29.8°) and the rotation does not (0.11°).
| block 11 | block 17 | |||||
| FITLM-CROP | GRID-CROP | STATICLM-ROT | FITLM-CROP | GRID-CROP | STATICLM-ROT | |
| spectrum angle (°) | 19.77 | 4.46 | 0.02 | 25.60 | 29.84 | 0.11 |
| spectrum distance | 0.803 | 0.296 | 0.016 | 0.827 | 0.818 | 0.011 |
| dominant gain | 0.090 | 0.647 | 0.983 | 0.047 | 0.087 | 0.986 |
| in-span share (32) | 0.919 | 0.951 | 0.999 | 0.957 | 0.961 | 0.997 |
| error in the top-8 eigenvectors (%) | 93.2 | 44.8 | 3.0 | 91.6 | 88.6 | 1.1 |
| error over signal, top 8 | 0.429 | 0.038 | 0.0001 | 0.472 | 0.382 | 0.0002 |
| error on the top 1% of tokens (%) | 68.1 | 62.2 | 6.3 | 52.6 | 51.8 | 5.7 |
| branch angle, median (°) | 6.80 | 8.29 | 5.75 | 5.95 | 6.74 | 5.69 |
| final angle, isolation (°) | 3.43 | 1.62 | 0.97 | 1.42 | 1.47 | 1.06 |
Table 12. fc2 of one block compressed alone at 4 bits, 500 images. The span measures of Section 5.1, the concentration of the error on tokens, the median branch angle (the angle between the output of fc2 and its compressed counterpart, per token) and the final stream angle.
What triggers the error: the input
Gaussian tokens do not trigger the loss: with the real mean and covariance they give a spectrum distance of 0.03 for the fitted table at block 11, against 0.80 for the real input. Independent hidden units with the real energy of each unit reproduce most of it (0.53), and the same energies permuted over the units remove it (0.02): it is the alignment of the input energy with the outlier columns of the heavy rows that triggers the error. At block 11 that energy comes from about 1% of the tokens, which lie along one eigenvector of six channels (724, 681, 319, 612, 427, 131).
The input scheme across blocks
Table 13 applies the description of § 5.2, estimated on 500 images of each block, to seven blocks and judges it on all 5,000 images, 4,500 of which were not used for the estimation. At blocks 11 to 14 it reproduces the span measures and the order of the schemes (Spearman 0.98 to 1.00); block 17 needs the mean of the tokens (0.60 without, 0.98 with); the quiet blocks 5 and 8 have no hot population, and the description reproduces their lack of failure (spectrum distance of the fitted table 0.023 and 0.097 against the real 0.026 and 0.031). Where the local measures cannot tell the two crop schemes apart (blocks 14 and 17), the description gives the same answer.
| block | (%) | ch. 60% of | spectrum dist. real / scheme | Spearman 15 pairs | table − grid real / scheme |
| 5 | 18.7* | 63 | 0.026 / 0.023 | 0.957 | −0.009 / −0.006 |
| 8 | 97.6* | 37 | 0.031 / 0.097 | 0.814 | −0.002 / +0.017 |
| 11 | 5.1 | 4 | 0.804 / 0.750 | 1.000 | 0.509 / 0.465 |
| 12 | 5.1 | 3 | 0.877 / 0.760 | 1.000 | 0.547 / 0.443 |
| 13 | 4.6 | 3 | 0.843 / 0.662 | 0.975 | 0.347 / 0.189 |
| 14 | 4.3 | 3 | 0.811 / 0.600 | 0.993 | 0.050 / 0.012 |
| 17 | 4.6 | 3 | 0.834 / 0.929 | 0.979 | 0.009 / 0.044 |
Table 13. The input scheme (with the mean) estimated on 500 images and compared with the real 5,000 images, at 4 bits: the hot share and the channels carrying 60% of ; the spectrum distance of the fitted table, real and generated; the Spearman correlation over the scheme-by-measure pairs; and the spectrum distance of the fitted table minus that of the grid, real and generated. 1
Mixed policies
Rotating a few matrices does not recover the gap. With the fitted table elsewhere, rotating block 0 and of block 1 (3 matrices), 4 matrices, or the 12 most sensitive matrices gives 95.94, 95.82 and 95.76% agreement (5,000 images), against 95.64% for none and 98.44% for all. On a grid base, rotating blocks 0–1 gains 0.11 [0.01, 0.20] points of agreement on 50,000 images, and the fitted table in blocks 20–21 changes the agreement by −0.04 [−0.14, +0.06] while the mean KL rises by 0.0048.
Conclusion
The angle between the compressed and the float32 residual stream, followed through the blocks, ranks the schemes as the classifier does and separates what top-1 and top-5 do not. The spectrum of the output of a matrix gives a measure that depends on the context, and a description of a few numbers estimated on 500 images generates inputs on which it can be studied. Together they show the two regimes of the error (independent accumulation with the rotation, amplification with the crop schemes) and where a scheme loses: in of a few blocks, through the dominant eigenvector of its output.
Scope. One model, the FFN weights, one random sign seed, and float32 evaluation of the compressed weights, so that we measure the representation and not a kernel and report no run time, including the cost of the rotation. The span analysis is at 4 bits and the flow curves are medians over tokens.
The error flow at 8, 6 and 2 bits
Figure 1 for the other widths: the median angle of the residual stream against the number of blocks, 5,000 images. Left: log–log with the line. Right: the angle divided by .

Figure 3. Error flow, 8 bits.

Figure 4. Error flow, 6 bits.

Figure 5. Error flow, 2 bits.
The spectrum angle flow at 8, 6 and 2 bits

Figure 6. Spectrum angle flow, 8 bits (as Figure 2).

Figure 7. Spectrum angle flow, 6 bits.

Figure 8. Spectrum angle flow, 2 bits.
References
- [1]Saleh Ashkboos, Amirkeivan Mohtashami, Maximilian L. Croci, Bo Li, Pashmina Cameron, Martin Jaggi, Dan Alistarh, Torsten Hoefler, and James Hensman. QuaRot: Outlier-free 4-bit inference in rotated LLMs. In Advances in Neural Information Processing Systems, volume 37, 2024.arxiv.org/abs/2404.00456
- [2]Jerry Chee, Yaohui Cai, Volodymyr Kuleshov, and Christopher De Sa. QuIP: 2-bit quantization of large language models with guarantees. In Advances in Neural Information Processing Systems, volume 36, pages 4396–4429, 2023.arxiv.org/abs/2307.13304
- [3]Paolo D’Alberto. Statistical inference and quality measures of KV cache quantisations inspired by TurboQuant, 2026.
- [4]Paolo D’Alberto, Ashish Siarasao, Elliott Delaye, and Rajeev Patwari. Ablation, statistical inference, and validation for KV-cache compression, 2026.
- [5]Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. QLoRA: Efficient finetuning of quantized LLMs. In Advances in Neural Information Processing Systems, volume 36, pages 10088–10115, 2023.arxiv.org/abs/2305.14314
- [6]Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations, 2021.
- [7]Elias Frantar, Saleh Ashkboos, Torsten Hoefler, and Dan Alistarh. GPTQ: Accurate post-training quantization for generative pre-trained transformers. In International Conference on Learning Representations, 2023.arxiv.org/abs/2210.17323
- [8]Ji Lin, Jiaming Tang, Haotian Tang, Shang Yang, Wei-Ming Chen, Wei-Chen Wang, Guangxuan Rein Xiao, Xingyu Dang, Chuang Gan, and Song Han. AWQ: Activation-aware weight quantization for on-device LLM compression and acceleration. In Proceedings of Machine Learning and Systems, volume 6, pages 87–100, 2024.DOI
- [9]Zechun Liu, Changsheng Zhao, Igor Fedorov, Bilge Soran, Dhruv Choudhary, Raghuraman Krishnamoorthi, Vikas Chandra, Yuandong Tian, and Tijmen Blankevoort. SpinQuant: LLM quantization with learned rotations. In International Conference on Learning Representations, 2025.arxiv.org/abs/2405.16406
- [10]Stuart P. Lloyd. Least squares quantization in PCM. IEEE Transactions on Information Theory, 28(2):129–137, 1982.DOI
- [11]Joel Max. Quantizing for minimum distortion. IRE Transactions on Information Theory, 6(1):7–12, 1960.DOI
- [12]Quinn McNemar. Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika, 12(2):153–157, 1947.pubmed.ncbi.nlm.nih.gov/20254758
- [13]Andreas Steiner, Alexander Kolesnikov, Xiaohua Zhai, Ross Wightman, Jakob Uszkoreit, and Lucas Beyer. How to train your ViT? data, augmentation, and regularization in vision transformers. Transactions on Machine Learning Research, 2022, 2022.
- [14]Sijie Yan, Yuan Yuan, Jiaming Ning, Yanhao Zhang, Zhongmin Wang, Chengjie Wang, and Hao Sheng. Positive-congruent training: Towards regression-free model updates. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14299–14308, 2021.arxiv.org/abs/2011.09161