cs.LGMar 27, 2026

H-Node Attack and Defense in Large Language Models

Authors: Eric Yocam, Varghese Vaidyan, Yong Wang

Organizations: Department of Computer Science and Software Engineering, California Polytechnic State University, San Luis Obispo, CA 93407, USA. · Beacom College of Computer and Cyber Sciences, Dakota State University, Madison, SD 57042, USA. · Department of Computer Science, University of Idaho, Moscow, ID 83844, USA.

Abstract

We present H-Node Adversarial Noise Cancellation (H-Node ANC), a mechanistic framework that identifies, exploits, and defends hallucination representations in transformer-based large language models (LLMs) at the level of individual hidden-state dimensions. A logistic regression probe trained on last-token hidden states localizes hallucination signal to a small set of high-variance dimensions -- termed Hallucination Nodes (H-Nodes) -- with probe AUC reaching 0.90 across four architectures. A white-box adversarial attack amplifies these dimensions at inference time via a real-time forward hook, achieving a selectivity of 3.02x with less than 10% visibility to the defender. Adaptive ANC defense suppresses H-Node excess in-pass using confidence-weighted cancellation, reducing grounded activation drift by 33-42% over static cancellation. A dynamic iterative extension that re-ranks cancellation targets across successive passes recovers up to 0.69 robustness from a single-pass baseline of 8%. All contributions are validated on OPT-125M, Phi-3-mini-4k-instruct, LLaMA-3-8B-Instruct, and Mistral-7B-Instruct-v0.3 (125M-8B parameters). Perplexity impact is surgical (<5%) and MMLU degradation is at most 3%, confirming that the defense does not impair general reasoning capability.

Figures & tables

Explore similar work

CardsList
  1. Adaptive Activation Cancellation for Hallucination Mitigation in Large Language Models

    Mar 10, 2026Eric Yocam, Varghese Vaidyan, Gurcan Comert +3LLM Hallucination MitigationActivation Steering

  2. Hybrid Adversarial Defence for Natural Language Understanding Tasks

    Jun 3, 2026Manar Abouzaid, Yang Wang, Chenghua Lin +1LLM Hallucination MitigationLLM Security

  3. Reward Stealing Attack on Large Language Models

    Oct 5, 2026Jiaming Qian, Pengyang Zhou, Jiahe Xu +1LLM AlignmentModel Extraction Attacks