Inference-Time Epistemic Quarantine for LLM Hallucination Containment
Large language models produce confident but factually incorrect outputs. Existing mitigation strategies operate at training time or as post-hoc filters. None address a specific failure mode: once a hallucinated claim enters a multi-step reasoning chain, it propagates. We introduce the Cognitive Immune System (CIS), a five-layer inference-time architecture that intercepts this propagation using NLI-based Wikipedia verification (DeBERTa-v3) and causal DAG memory. We prove a Containment Depth Bound: k* = ceil(log(epsilon)/log(1-rho)) sequential checkpoints guarantee contamination escape probability below any target. On HotpotQA with adversarial semantic injection (N=200): 12% detection rate, 7% false positive rate. Wiki-only ablation: 22% detection at 0% false positives. Primary bottleneck identified: semantic drift between injected contamination and LLM-paraphrased claims. Code: github.com/MALIKSAAD-dev/cognitive-immune-system
Authors
- Muhammad Saad
Institutions
- Institute of Space Technology (PK)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-04-01
- DOI
- https://doi.org/10.5281/zenodo.19491736
- Primary Topic
- Artificial Immune Systems Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00