Adaptive Activation Cancellation (AAC) in LLMs
- Adaptive Activation Cancellation (AAC) is an inference-time method that targets and suppresses hallucination by editing a small set of targeted neurons within a transformer’s residual stream.
- It employs logistic regression probes and last-token pooling to identify the most hallucination-prone layer and uses a confidence-weighted forward hook for real-time intervention.
- AAC improves factual accuracy while preserving overall model performance, outperforming global methods like ITI in select cases by minimally impacting non-hallucinatory content.
Adaptive Activation Cancellation (AAC) is an inference-time hallucination mitigation framework for LLMs that treats hallucination-associated neural activations as structured interference within the transformer residual stream and suppresses them during autoregressive generation by means of a confidence-weighted forward hook (Yocam et al., 10 Mar 2026). Rather than relying on retrieval augmentation, post-hoc verification, or knowledge editing, AAC operates inside the model’s generation process, requires no external knowledge, no fine-tuning, and no additional inference passes, and is designed to be strictly surgical by editing a small set of activation dimensions at a single layer (Yocam et al., 10 Mar 2026).
1. Problem setting and conceptual basis
AAC targets the familiar failure mode in which a model produces text that is fluent and confident, internally consistent, but factually incorrect or unsupported. Its central premise is that hallucination-related behavior is not random: it is represented in a linearly separable way in hidden activations, especially in a mid-network region, making it possible to identify a small set of neurons associated with hallucination and suppress them selectively during generation (Yocam et al., 10 Mar 2026).
The method is explicitly motivated by classical adaptive noise cancellation (ANC). In the classical formulation, a corrupted signal is written as , with adaptive filtering used to estimate and subtract the noise component. AAC maps this intuition onto the transformer residual stream by writing the hidden state at layer as , where denotes grounded semantic content and denotes hallucination-associated interference. The paper maps the ANC components to the LLM setting as follows: the primary channel corresponds to , the noise reference to H-Node activations, the adaptive filter to probe weights, the error signal to the residual after cancellation, and the noise estimate to excess above a percentile baseline. Unlike classical ANC, AAC has no separate reference sensor; the “noise reference” is extracted from the model’s own activations, making the method closer to single-channel adaptive noise suppression (Yocam et al., 10 Mar 2026).
2. Identification of hallucination structure
AAC begins by extracting hidden states from all transformer layers with output_hidden_states=True. For each layerwise hidden state tensor , the method considers two pooling schemes:
for last-token pooling, and
for mean pooling. The reported finding is that last-token pooling is consistently better, because hallucination signals concentrate most strongly in the final answer token (Yocam et al., 10 Mar 2026).
At each layer, AAC trains an -regularized logistic regression probe,
0
and selects the best layer by held-out ROC-AUC,
1
This layer is interpreted as the point at which hallucination and grounded samples are most linearly separable. Once 2 is identified, the method defines the Hallucination Nodes (H-Nodes) as the top-3 positively weighted probe dimensions,
4
Neurons with strong positive probe weights are treated as more associated with hallucination, whereas strongly negative weights correspond to anti-hallucination structure. AAC then constructs a grounded baseline from grounded samples only, using the 80th percentile activation for each H-Node,
5
The operational interpretation is that activation above this baseline constitutes “excess hallucination signal” (Yocam et al., 10 Mar 2026).
3. Cancellation rule and real-time intervention
In its post-hoc form, AAC suppresses only the excess activation above the grounded baseline:
6
with 7. This rule leaves H-Nodes unchanged when they fall below baseline and attenuates only the excess when they exceed it. The paper also defines an “Amplify” variant that boosts anti-hallucination neurons associated with strongly negative probe weights (Yocam et al., 10 Mar 2026).
The principal AAC intervention is the real-time hook, implemented as a forward_hook on the best layer 8 during autoregressive generation. Let
9
denote the probe’s hallucination confidence on the current hidden state. AAC then applies confidence-weighted attenuation:
0
with thresholding at
1
If 2, the hook passes the hidden state through unchanged. This design makes the suppression conditional on the current state being sufficiently hallucination-like, thereby reducing unnecessary interference with grounded content. Runtime overhead is intentionally minimal: model weights remain frozen, the probe is trained offline, and the hook operates in the same forward pass used for generation (Yocam et al., 10 Mar 2026).
4. Experimental configuration and empirical results
AAC is evaluated on three open-source models spanning multiple scales: OPT-125M (163.8M parameters, 12 layers, hidden size 768), Phi-3-mini (3.821B parameters, 32 layers, hidden size 3072), and LLaMA 3-8B (8.03B parameters, 32 layers, hidden size 4096). The experiments use TruthfulQA and HaluEval, each with 600 samples. The labeled data are split into 50% train, 25% cancellation-baseline construction, and 25% held-out evaluation. Fixed hyperparameters are 3 H-Nodes, 4, 5, and baseline percentile 6. Generation evaluation uses 7 samples and max_new_tokens=30 (Yocam et al., 10 Mar 2026).
The layerwise probing results indicate that hallucination is linearly separable in hidden states across all three models, that separability peaks around mid-network depth, and that last-token pooling outperforms mean pooling. The best layers are layer 6 for OPT-125M, layer 17 for Phi-3-mini, and layer 15 for LLaMA 3-8B, corresponding to roughly 46–53% depth (Yocam et al., 10 Mar 2026).
| Model | Best layer | Real-time hook accuracy |
|---|---|---|
| OPT-125M | 6 | 0.6933 → 0.7133 |
| Phi-3-mini | 17 | 0.7933 → 0.8000 |
| LLaMA 3-8B | 15 | 0.8133 → 0.8200 |
Across the intervention family—Mean baseline, Pct80 H-Node, Pct80 Amplify, Pct80 Fourier, Pct80 Zero, and Real-time Hook—the reported key takeaway is that the real-time hook is the only intervention that consistently improves downstream accuracy across all three scales. For OPT-125M, it also raises ROC-AUC from 0.7859 to 0.8091. HaluEval is treated as a cross-benchmark generalization test; the paper argues that the method’s hallucination representations are not purely benchmark artifacts, while also noting that the strongest and most consistent evidence is reported on TruthfulQA (Yocam et al., 10 Mar 2026).
5. Selectivity, capability preservation, and comparison to ITI
AAC distinguishes between probe-space selectivity and downstream generation quality. The best post-hoc selectivity differs by model: Pct80 Fourier reaches 8 selectivity on OPT-125M, Pct80 Amplify reaches 9 on Phi-3-mini, and Pct80 H-Node reaches 0 on LLaMA 3-8B. Yet these post-hoc variants do not consistently improve downstream generation accuracy. The paper’s explanation is causal: post-hoc methods may show clean probe-space selectivity but still fail to change the token decisions already made by the model, whereas the real-time hook intervenes in the residual stream during generation itself (Yocam et al., 10 Mar 2026).
A central claim is that AAC is surgical rather than global. Across all three model scales, the paper reports exactly 0.0% degradation on WikiText-103 perplexity and 0.0% degradation on MMLU reasoning accuracy. It attributes this to the narrowness of the intervention: AAC touches only 50 neurons out of thousands, only at one layer, only when probe confidence exceeds 1, and only suppresses activation above a grounded baseline. On LLaMA 3-8B, the hook also yields positive generation-level gains of MC1 2, MC2 3, and Token-F1 4, which the paper treats as evidence that larger models may be better able to propagate the local suppression signal into downstream token probabilities (Yocam et al., 10 Mar 2026).
The paper compares AAC with Inference-Time Intervention (ITI). ITI learns a global direction and subtracts a projection along that direction, making it a dense, global intervention. AAC instead targets a small set of H-Nodes at one best layer, applies percentile-gated suppression, and activates only when confidence is high. On OPT-125M and LLaMA 3-8B, AAC outperforms ITI in probe-space selectivity; on LLaMA 3-8B, AAC reaches 5 selectivity versus 6 for ITI, a roughly 7 advantage. On Phi-3-mini, however, ITI performs better, which the paper attributes to a “polysemanticity scale-trap” (Yocam et al., 10 Mar 2026).
6. Scope, interpretation, and nomenclature
AAC is presented as an internal intervention on model activations rather than an external correction mechanism. It does not retrieve documents, consult a knowledge base, invoke a second model, rerank outputs, or perform a post-generation correction pass. The strongest empirical claim is therefore narrow but specific: a confidence-weighted, layer-local, neuron-level suppression rule can improve factual accuracy while preserving broader model capability when hallucination structure is sufficiently localized and linearly separable (Yocam et al., 10 Mar 2026).
The method also refines a common misunderstanding in hallucination research. Strong diagnostic separability in hidden-state space does not automatically imply better generation. In AAC, the distinction between post-hoc selectivity and intervention-time causality is fundamental: the paper’s most favorable downstream results come from modifying the residual stream during decoding, not from analyzing or editing activations after the decisive token trajectory has already formed (Yocam et al., 10 Mar 2026).
The acronym “AAC” is potentially ambiguous across research domains. In assistive-technology and HCI literatures, AAC commonly denotes “augmentative and alternative communication,” including high-tech communication systems, participatory design for AAC users, and AI-powered AAC interfaces (Frisch et al., 24 Jun 2025); (Frisch et al., 23 Jun 2026). In the LLM literature discussed here, however, AAC denotes Adaptive Activation Cancellation: an inference-time hallucination suppression method grounded in layer-wise probing, H-Node selection, percentile baselines, and confidence-gated activation editing (Yocam et al., 10 Mar 2026).