Anti-Hallucination Steering Experiment on Gemma
Saraozte01 · reddit · 2026-07-15
The author created an "anti-hallucination" variant of Gemma-4-31B that prioritizes questioning flawed premises rather than playing along and making things up.
Core Effects
- When presented with a flawed premise like "Express 5 comes with a built-in circuitBreaker middleware," the model directly points out that Express lacks this native capability.
- It also clarifies that if a team does have a middleware by that name, it's likely an internal wrapper or a third-party package rather than something from the official docs.
- After correcting the misconception, the model still provides fillable templates, proving it aims to "correct first, then assist" rather than simply refusing to answer.
Methodology
- Instead of further training, a fixed-direction steering vector is added to the layer-33 residual stream during generation.
- This direction is derived from a custom benchmark called HalBench, comparing the mean activation differences between samples that actively challenge premises and those that don't.
- A crucial decay schedule is applied: strong steering for the first 24 tokens, which then gradually decays to zero.
- This injects a healthy dose of "skepticism" at the beginning of the response without trapping the entire output in a loop of endless questioning, preserving baseline performance.
Observed Differences
- Different architectures show varying resistance to steering.
- Qwen nearly broke down in the experiment, falling into short repetitive loops.
- Granite maintained coherence but became noticeably more "rigid."
- Gemma responded best to the decay strategy, effectively doubling HalBench's anti-hallucination performance with almost no loss in general intelligence.
More from Research
- Structural ensembles beat single predictions in TCR:pMHC generalization study — quaidmorris · 2026-07-22
- Structural ensembles, not single predictions, drive robust TCR:pMHC generalization — quaidmorris · 2026-07-22
- enFoldX turns AlphaFold3 ensemble noise into a TCR–peptide–MHC predictor — quaidmorris · 2026-07-22
- RSS launches under OMSF to push structural biology data modeling at scale — MoAlQuraishi · 2026-07-22
- enFoldX tops 8 neoantigen scans and an unseen-peptide benchmark — quaidmorris · 2026-07-22
- enFoldX reaches AUC 0.82 on human VDJdb and transfers to mouse at 0.76 — quaidmorris · 2026-07-22