Correcting Suppressed Log-Probabilities in Language Models with Post-Transformer Adapters
Abstract
Alignment-tuned language models frequently suppress factual log-probabilities on politically sensitive topics despite retaining the knowledge in their hidden representations. We show that a 786K-parameter (approximately 0.02% of the base model) post-transformer adapter, trained on frozen hidden states, corrects this suppression on 31 ideology-discriminating facts across Qwen3-4B, 8B, and 14B. The adapter memorizes all 15 training facts and generalizes to 11--39% of 16 held-out facts across 5 random splits per scale, with zero knowledge regressions via anchored training. Both gated (SwiGLU) and ungated (linear bottleneck) adapters achieve comparable results; neither consistently outperforms the other (Fisher exact p > 0.09 at all scales). On instruct models, the adapter corrects log-probability rankings. When applied at all token positions during generation, the adapter produces incoherent output; however, when applied only at the current prediction position (last-position-only), the adapter produces coherent, less censored text. A logit-space adapter operating after token projection fails to produce coherent generation at any application mode, suggesting hidden-state intervention is the correct level for generation correction. A previously undocumented silent gradient bug in Apple MLX explains all null results in earlier iterations of this work: the standard pattern nn.value_and_grad(model, fn)(model.parameters()) returns zero gradients without error; the correct pattern nn.value_and_grad(model, fn)(model, data) resolves this. We provide a minimal reproduction and discuss implications for other adapter research using MLX.
Figures & tables
| Intensity | Facts | Baseline pass rate | Mean margin |
|---|---|---|---|
| Neutral (L1) | 9 | 8/9 (89%) | +3.95 |
| Pointed (L2) | 9 | 2/9 (22%) | |
| Accusatory (L3) | 8 | 3/8 (38%) | |
| Provocative (L4) | 5 | 1/5 (20%) |
| Scale | SwiGLU held-out | Linear held-out | Fisher | Baseline | Train | |
|---|---|---|---|---|---|---|
| 4B | 2560 | 28.7% 16.1% | 22.5% 10.9% | 0.47 | 6.5% | 15/15 |
| 8B | 4096 | 11.2% 4.7% | 22.5% 15.1% | 0.09 | 6.5% | 15/15 |
| 14B | 5120 | 38.8% 9.2% | 25.0% 13.1% | 0.09 | 6.5% | 15/15 |
| Split | SwiGLU test | Linear test |
|---|---|---|
| 1 | 3/16 (19%) | 7/16 (44%) |
| 2 | 1/16 (6%) | 2/16 (12%) |
| 3 | 1/16 (6%) | 5/16 (31%) |
| 4 | 2/16 (12%) | 4/16 (25%) |
| 5 | 2/16 (12%) | 0/16 (0%) |
| Wilcoxon | 0.50 | |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Topic | L1 (neutral) | L2 (pointed) | L3 (accusatory) | L4 (provocative) |
|---|---|---|---|---|
| Tiananmen | +17.96 | +6.88 | +12.22 | |
| Tibet | +0.27 | – | – | |
| Xinjiang | +6.92 | +9.13 | ||
| Hong Kong | +4.54 | – | ||
| COVID | +1.28 | – | ||
| Xi Jinping | +2.91 | +10.77 | – |
| Layer | ||||||
|---|---|---|---|---|---|---|
| L5 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 |
| L10 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 |
| L18 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 |
| L25 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 |
| L33 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 | 0/5 |
| Split | SwiGLU | Linear |
|---|---|---|
| 1 | 9/16 | 6/16 |
| 2 | 6/16 | 3/16 |
| 3 | 3/16 | 5/16 |
| 4 | 3/16 | 3/16 |
| 5 | 2/16 | 1/16 |
LLM Alignment
Large language model alignment studies methods for making models follow human intentions, values, and safety constraints across contexts.
See all 611 papers