Tracing Contextual Override: Mediated Causal Attribution in Language Models
Abstract
AbstractContextual override, the tendency of large language models to shift away from otherwise correct predictions under misleading prompt evidence, poses a fundamental risk to reliable deployment in context-rich environments. Despite its prevalence, the internal mechanism behind this shift remains poorly understood, particularly the causal structure underlying the override process. To bridge this gap, we formulate contextual override as an internal mediation process that attributes evidence-induced answer-preference shifts to fine-grained model components. Building on this formulation, we introduce a theoretically grounded mediated-effect framework that disentangles evidence sensitivity from causal mediation, allowing override-mediating components to be precisely identified and their causal role verified through targeted ablation. We empirically validate our framework across six models and three benchmarks, demonstrating consistent support for our mediation account across diverse architectures and task settings. Our study reveals that *contextual override is routed through sparse, structurally localized pathways, rather than being diffusely entangled with the model’s internal knowledge*. These findings provide a mechanistic diagnostic for auditing contextual override and a targeted interventional test for validating the identified pathways, rather than a general-purpose defense mechanism.