Activation-Weighted Low-Rank Compression: Likelihood, Drift, and Practical Cost

Sambhav Surana · Research project

Updated · Exploratory findings

Current IEEE paper source · Plain-language reader guide · Repository

Abstract

Large language models use large matrices, or tables of numbers, to turn text into predictions. Replacing some of these matrices with two smaller ones can save storage, but the replacements may change how information passes through the model. We study whether a compression method guided by the model's observed inputs can preserve its predictions and the internal signals passed between layers. We compare this method with a version that also penalizes changes to the original weights, using the same number of stored values. Tests on three pretrained language models show that the penalty provides no consistent improvement in both prediction quality and internal similarity. In one model, prediction quality improves while average error in these internal signals grows to 3.86 times that of the method without the penalty. Tests on consecutive layers also find a group where both prediction quality and internal similarity worsen for all three choices of fitting data. Separate storage and timing tests remove 29.17% of the weights in the selected matrices, but reduce the complete model file by only 0.894%; execution time varies with the workload. These findings show that prediction quality alone cannot establish whether compression preserves the original computation. Failed full-rank SVD numerical controls, incomplete additional tests for one model, and evaluation on a previously used text dataset make the findings exploratory. A practical compression claim therefore needs separate evidence for prediction quality, internal behavior, storage, and speed.

1. What the study asks

Can a pretrained transformer use fewer stored weights while retaining the original model’s behavior? We replace selected attention-output matrices with two smaller factors and measure both next-token prediction and the internal signals passed between blocks.

Current finding. Activation-aware fitting improves on plain SVD in the tested Gemma setting. Adding the weight-space anchor gives no consistent improvement in both prediction quality and residual fidelity across Gemma, Qwen and LFM. A better likelihood score alone cannot establish preservation of the original computation.

2. What is compared

Replace a dense projection with two smaller factors, applying the original bias once.

Original projection
Wx+b
Compact replacement
U(Vx)+b

At the same factor budget, both fits use calibration activations to weight input directions. The anchored fit also penalizes changes to the original weights.

The fitting objective
Jβ(A)= ‖(W−A)X‖F2 +βn‖W−A‖F2

A = UVFirst term: activation fitSecond term: weight anchor

Matched whitening

β = 0 · ρ = 0

Ours (anchored)

β = 0.03 · ρ = 0
Shown in orange in the charts.

Primary ranks: Gemma 384 · Qwen 483 · LFM 725.
Other layers and hybrid mixers remain dense.

Protocol and interpretation

The historical quality cohorts use calibration seeds 11, 23 and 37, paired across methods. WikiText-2 supplies calibration, validation and test splits; the test set has already influenced the project, so these are regression results. The later BF16 practical cohort uses only seeds 11 and 23 and supplies no new drift measurements.

Exact-arithmetic formulas require their stated rank and spectral assumptions. The failed full-rank SVD controls do not demonstrate a failure of the whitening or anchored fits. Method-specific full-rank checks are still needed to separate their mathematical objectives from numerical effects. The current paper documents measured-output fitting, extra ridge and spectral cutoffs separately.

3. Concept illustration

This optional animation uses synthetic points and visual metaphors for different fitting geometries. It is not a measured layer, a literal factorization surface, or evidence that compression preserves computation.

Optional concept illustration

Drag to rotate or use the buttons. Animation starts paused when reduced motion is requested. The measured charts below work without JavaScript or WebGL.

4. Results

The charts use the same saved numbers as the current IEEE source. On a narrow screen, scroll a chart horizontally or open its exact-value table. NLL is negative log-likelihood; lower NLL means better prediction on the scored text. Residual drift measures internal-state difference from the original model.

Gemma 3-1B: horizontal prediction-loss and drift bars

Gemma 3-1B horizontal comparisonHorizontal bars compare five recorded Gemma 3-1B methods. Ours (anchored) is orange. All bars start at zero. Whitening and ours have close means; seed variation remains important.0246NLL — lower is betterPrediction lossPlain SVD5.0886815.0886815.088681Diagonal ASVD3.6944663.6944663.694466Covariance whitening3.5728143.5728143.572814Ours (anchored)3.5659213.5659213.565921Extra ridge3.5790343.5790343.57903400.0250.050.0750.1Residual drift — lower is betterInternal representation drift0.0742480.0742480.0742480.0309720.0309720.0309720.0106380.0106380.0106380.0105470.0105470.0105470.0118360.0118360.011836
Horizontal bars start at zero. Orange identifies Ours (anchored), the measured β = 0.03 fit already reported in the paper. The same rank-384 factor budget is used for all compressed methods. Whiskers are sample standard deviations across three calibration seeds; the single SVD fit has no error bar. The dashed line marks the dense teacher’s NLL, 3.451563. Extra ridge uses β = 0.1 and ρ = 0.01. The historical FP16 numerical-readiness qualification still applies.
Exact chart values
Gemma 3-1B: horizontal prediction-loss and drift bars — original reported values
MethodNLLResidual driftSeeds
Plain SVD5.088681 (single fit)0.074248 (single fit)1
Diagonal ASVD component3.694466 ± 0.0024200.030972 ± 0.0001973
Covariance whitening3.572814 ± 0.0118190.010638 ± 0.0003823
Ours (anchored)3.565921 ± 0.0095760.010547 ± 0.0004923
Extra ridge3.579034 ± 0.0085210.011836 ± 0.0001393

The anchor’s mean Gemma NLL is 3.565921 versus 3.572814 for whitening. Its average drift is slightly lower, but drift worsens in two of three paired seeds. The average does not establish a reproducible joint improvement.

Layer groups: Ours (anchored) minus whitening

Layer-group changes relative to whiteningOurs (anchored) minus whitening, paired means over three calibration seeds. A signed value column beside each plot aligns with the dots. Values left of zero favor ours. Blocks 11–14 worsen on both metrics; all 26 has a small average improvement that does not hold in every group.-8-6-4-202ΔNLL, in units of 0.001Prediction-loss changeValue0 (2/3)-0.0000484-0.048412 (0/3)-0.0003431-0.343125 (0/3)-0.0002025-0.20250–1 (1/3)-0.0000478-0.047812–13 (0/3)+0.0000058+0.005824–25 (0/3)-0.0001833-0.18330–3 (2/3)-0.0002942-0.294211–14 (0/3)+0.0027237+2.723722–25 (2/3)-0.0009939-0.9939All 26 (1/3)-0.0068927-6.8927-15-10-505Δ drift, in units of 0.00001Residual-drift changeValue-3.392768e-06-0.3393+1.50569e-06+0.1506+3.248449e-07+0.0325-8.883664e-05-8.8837+2.945603e-06+0.2946-2.956141e-08-0.0030-0.0001338675-13.3868+6.855561e-05+6.8556-1.052808e-05-1.0528-9.051551e-05-9.0516
Negative differences favor the anchor. Signed values are aligned in a column beside each plot, on the same row as their dots. They use the axis units (0.001 for NLL and 0.00001 for drift), rounded to four decimal places. Parentheses show seeds with both lower NLL and lower drift, out of three. They do not indicate statistical significance. Blocks 11–14 worsen on both metrics in all three seeds.
Exact chart values
Layer groups: Ours (anchored) minus whitening — original reported values
BlocksMean NLL differenceMean drift differenceJointly better
0-0.0000484-3.392768e-062/3
12-0.0003431+1.50569e-060/3
25-0.0002025+3.248449e-070/3
0–1-0.0000478-8.883664e-051/3
12–13+0.0000058+2.945603e-060/3
24–25-0.0001833-2.956141e-080/3
0–3-0.0002942-0.00013386752/3
11–14+0.0027237+6.855561e-050/3
22–25-0.0009939-1.052808e-052/3
All 26-0.0068927-9.051551e-051/3

Other models: Qwen3.5-0.8B and LFM2.5-1.2B

Hybrid-model comparisonsHorizontal bars show dense reference, plain SVD, whitening and orange Ours (anchored) for each tested model. Repeated fits include sample seed standard deviations. Dense and SVD controls are recorded once.01234NLL — lower is betterQwen3.5-0.8B, rank 483Dense reference2.9172202.9172202.917220Plain SVD3.1809933.1809933.180993Whitening2.9344392.9344392.934439Ours (anchored)2.9433242.9433242.94332400.030.060.09Residual drift — lower is betterQwen3.5-0.8B, rank 483Dense reference0.0000000000.0000000000.000000Plain SVD0.0616629850.0616629850.061663Whitening0.0061547880.0061547880.006155Ours (anchored)0.0127619530.0127619530.012762012345NLL — lower is betterLFM2.5-1.2B, rank 725Dense reference3.9987363.9987363.998736Plain SVD3.8524323.8524323.852432Whitening4.0564054.0564054.056405Ours (anchored)3.8359163.8359163.83591600.10.20.3Residual drift — lower is betterLFM2.5-1.2B, rank 725Dense reference0.0000000000.0000000000.000000Plain SVD0.2377787310.2377787310.237779Whitening0.0358803940.0358803940.035880Ours (anchored)0.1383459100.1383459100.138346
Horizontal bars start at zero; orange identifies Ours (anchored). Whitening and Ours show three-seed means with sample standard-deviation whiskers. Dense reference and plain SVD are single recorded controls with no error bars. The dense model is an uncompressed reference. The controls and uncertainty values come from the same saved test records, not new experiments. Qwen: rank 483, 8/8 primary-test records and 10/18 validation records. LFM: rank 725, 8/8 test and 18/18 validation records. These differences do not isolate architecture effects.
Exact chart values
Other models: Qwen3.5-0.8B and LFM2.5-1.2B — original reported values
Model / methodNLLResidual driftSeeds
Qwen / Dense reference2.917220 (single control)0.000000000 (single control)1
Qwen / Plain SVD3.180993 (single control)0.061662985 (single control)1
Qwen / Whitening2.934439 ± 0.0014550.006154788 ± 0.0000906823
Qwen / Ours (anchored)2.943324 ± 0.0022720.012761953 ± 0.0001600263
LFM / Dense reference3.998736 (single control)0.000000000 (single control)1
LFM / Plain SVD3.852432 (single control)0.237778731 (single control)1
LFM / Whitening4.056405 ± 0.0228860.035880394 ± 0.0007776163
LFM / Ours (anchored)3.835916 ± 0.0103350.138345910 ± 0.0008643773

LFM shows why the metrics must be assessed separately: the anchor improves likelihood in every seed while mean residual drift rises to about 3.86 times the whitening mean. Lower NLL does not establish preservation, denoising, or a particular causal mechanism.

5. Storage and timing

The separate BF16 cohort removes 29.17% of weights in the targeted matrices. Complete checkpoint size falls from 1,999,883,711 to 1,982,003,507 bytes: 17,880,204 bytes, or 0.894%. Most model weights remain untouched. Anchor and whitening checkpoints have identical sizes.

Separate BF16 practical conditions
BF16 conditionSeedRaw NLLScaled NLLWhole GiB
Dense teacher-3.4515493.4226011.862537
Whitening113.5560863.5417261.845885
Anchor113.5568263.5422551.845885
Whitening233.5684313.5532671.845885
Anchor233.5629493.5453411.845885

Temperature is selected on validation and then frozen; the five saved selections are approximately 1.090508. GiB means 2³⁰ bytes. These are descriptive full-test aggregates without paired block intervals.

Median latency ratio: anchor / matched whitening
WorkloadSeed 11 median ratioSeed 23 median ratio
Prefill 1281.18760.9370
Decode 128 after prompt 1281.10730.9679
Prefill 5121.01080.9473
Decode 128 after prompt 5120.98760.9580

Ratios below one favor the anchor. Seed 11 is slower for the 128-token conditions, while seed 23 favors it in the measured workloads. Timing uses a resident RTX 4070 Ti, batch size one, 10 warmups and 30 synchronized samples. Cached decode excludes the initial prompt pass. These observations establish no consistent anchoring speed advantage or general acceleration over the dense teacher.

6. Limitations and evidence boundaries

  • Some full-rank SVD controls failed the predefined numerical tolerances. This does not establish that whitening or anchoring failed those checks. Method-specific full-rank numerical equivalence remains unestablished by the SVD controls, so comparisons describe the measured implementations.
  • Qwen has all eight primary-test records but only 10 of 18 validation-frontier records. Missing measurements remain missing.
  • WikiText-2 has already influenced the project. No fresh-domain confirmation, downstream task accuracy, or free-running generation equivalence has been established.
  • Three calibration seeds do not represent independently pretrained models. The later BF16 practical cohort has only two seeds and no new drift measurements.
  • Only the selected attention-output matrices are studied. Results do not establish preservation for MLPs, hybrid mixers, larger models, or other rank allocations.
  • Model file size, CUDA allocator peaks and warmed-up latency are distinct measurements. Storage savings alone do not establish practical speed or memory savings.

7. Future Scope

A small neural network for compression

A proposed next direction is a small bottleneck neural network that learns a compact mapping for selected dense projections from the original model’s activations. A second option is a small correction network alongside lower-rank factors.

Every retained factor, network weight and bias must count toward a matched storage budget. Any local improvement must be checked for held-out prediction quality and residual drift after replacements are composed across layers, alongside complete file size, peak memory and warmed-up latency. Neither network has been implemented or tested here.

Numerical controls and broader evaluation

Explain the failed full-rank SVD controls, add full-rank numerical checks specific to whitening and anchoring, and complete missing Qwen measurements before controlled comparisons of group-output matching. Fresh evaluation data, downstream tasks and generation tests need frozen splits, budgets and decision criteria. Fused factor execution and runtime-informed rank allocation remain further hypotheses.

TinyBERT is a related teacher–student distillation precedent; it does not establish the proposed projection replacement’s effectiveness. The paper’s full Future Scope is Section 8, including the small-network proposal in Section 8.1.

8. Paper and reproducible evidence

  • Current IEEE paper PDF — eight pages with horizontal comparison charts and aligned side values for layer-group differences; Future Scope is on page 7.
  • Current IEEE paper source — larger mathematical displays and vector charts for dense comparisons; simpler BF16 and timing values remain tables.
  • Updated reference PDF — the same updated numerical-control wording and Future Scope, with the reference table layout.
  • Frozen evidence report — source runs, complete recorded comparisons and unresolved gaps.
  • Chart and table data (JSON) — original reported values and fingerprints of the current paper source and PDF.
  • IEEE preparation notes — generic conference formatting; the actual venue remains unidentified.

Both appendices were removed from the current paper. Their experiment records and uncertainty intervals remain in the repository. The existing paper editor stays the place to compile the latest IEEE source.