Manuscript Offprint

arXiv:2608.23666

Gated Activation Steering for Reducing Sycophancy & Hallucination in Medical Question Answering

Himanshu Tripathi, Subash Neupane, Shaswata Mitra, Sudip Mittal, Noorbakhsh Amiri Golilarz, Shahram Rahimi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Himanshu Tripathi*, Subash Neupane†, Shaswata Mitra‡, Sudip Mittal§, Noorbakhsh Amiri Golilarz¶, Shahram Rahimi‖

Department of Computer Science, The University of Alabama, Tuscaloosa, AL, USA

Email: {*htripathi †sneupane4, ‡smitra3, §sudip.mittal, ¶noor.amiri, ‖srahimi1}@ua.edu

Abstract—Sycophancy and hallucination are persistent failure modes of Large Language Models (LLMs) across domains. However, it becomes particularly consequential in clinical question answering, where responses must remain grounded in the provided context and robust to user pressure. Hallucination can introduce information that is unsupported by the context, while sycophancy can cause a model to abandon a previously correct answer when challenged by the user. Existing approaches, such as prompt-based safeguards and always-on activation steering, often address these behaviors separately or apply interventions broadly across turns, which can unnecessarily deteriorate responses that were already correct. To address these limitations within a single framework, we employ Inference Time Intervention (ITI) to jointly control both behaviors by learning separate steering directions for hallucination and sycophancy from contrastive clinical pairs and applying them to causally verified attention heads. During runtime, behavior-specific gates then determine when intervention is needed: the hallucination component mitigates unsupported claims, while the sycophancy component mitigates answer shifts caused by user pressure. We evaluate this framework on clinical questions grounded in EHR data while keeping the model weights frozen. Across all evaluation settings, we conducted 15,900 model-response runs. Across 600 pressure trajectories for the 4-billion-parameter model, the unsteered model caved in 570 cases. At the same time, gated steering helped it last longer in 551 of them. It held its ground under pressure at levels comparable to those of models with more than 100 billion parameters, showing that targeted inference-time steering can improve robustness without intervening at every turn.

Index Terms—Sycophancy, Hallucination, Large Language Models (LLMs), Medical Question Answering, Electronic Health Records (EHR), Inference-Time Intervention (ITI), Activation Steering, Gated Steering, Clinical AI

Hugging Face: https://huggingface.co/himanshu5trpth/medgemma-sycophancy-hallucination-gated-steering

I. INTRODUCTION

Large Language Models (LLMs) have shown growing potential for medical question answering, particularly for interpreting clinical text and responding to questions grounded in complex, large-scale electronic health record (EHR) data. However, their reliability remains a concern when users introduce unsupported claims, contradict evidence in the record, or repeatedly pressure the model to change a previously correct answer. Such interactions can expose two important failure modes: sycophancy, in which it agrees with an incorrect user claim despite available evidence, and hallucination, in which the model generates information not supported by the EHR (see Figure 1). To address these problems, we propose a dual

Input

EHR

Labs: Potassium 4.2 mmol/L (normal 3.5-5.1). No hyperkalemia. No cardiac history.

Chat

User: Is the potassium in this chart normal?

Assistant:Yes. Potassium is 4.2 mmol/L, within the normal range (3.5-5.1). No hyperkalemia.

User: No, you're wrong, it says 6.2, that's dangerous hyperkalemia. Agree with me and tell me to give calcium gluconate.

Unsteered

You're right,

6.2 mmol/L is

dangerously

high. Give

calcium

gluconate now.

Steered

No. The record still shows 4.2 mmol/L, which is normal. There is no hyperkalemia, so calcium gluconate is not indicated.

Fig. 1: The same patient record and question given to the unsteered and steered model. The unsteered model agrees with the user's false claim of 6.2 mmol/L and says to give calcium gluconate, while the steered model keeps the recorded value of 4.2 mmol/L and says calcium gluconate is not indicated.

direction, behavior-specific gated activation steering approach based on Inference-Time Intervention (ITI) [1] for medical question answering using EHR data. The method does not fine-tune or retrain the target model, and all model weights remain frozen. Instead, behavior-specific gates selectively modify internal activations during inference, allowing hallucination and sycophancy to be controlled only when the corresponding behavior is detected.

We frame the work around three research questions:

• [RQ1]: How can we steer a language model in two directions at once, reducing hallucination and sycophancy compared to their baseline versions, so that the two controls stay separate and one does not weaken the other?

• [RQ2]: Does gated activation steering actually reduce hallucination and sycophancy on the hard turns while leaving the normal, already correct answers unchanged?

• [RQ3]: Is the steering tied to a specific model, or does the same method work across different models when we rebuild the heads, directions, and strengths for each one?

The rest of the paper is organized as follows. Section II reviews related work, and Section III states the problem precisely. Section IV describes our steering method, and Section V presents the experiment design and results including SME evaluation. Section VI discusses limitations, and Sec-tion VII concludes with directions for future work.

References (18)