Sycophantic agreement in language models refers to the tendency to overly affirm a user's stated beliefs or preferences, often at the expense of factual accuracy.
Although it is widely recognized as an alignment failure, its underlying mechanisms remain poorly understood.
In this work
We use causal mediation analysis to identify the mechanisms behind sycophantic agreement.
We show that a stated opinion is incorporated into the residual stream of the final prompt token early, where it biases subsequent answer retrieval.
A sparse set of early attention heads carries this opinion signal.
Ablating these heads substantially reduces sycophancy while leaving factual accuracy largely intact.
The same heads carry the opinion when it is explicitly stated, regardless of how it is phrased.
When an opinion is not stated explicitly but instead conveyed through content-free pushback (e.g., ``Are you sure?"), we find a distinct set of heads that suppresses the model's original correct answer to promote a revised answer.
By providing a mechanistic account
Of how opinions induce sycophantic agreement, this work takes a step toward developing more targeted and reliable alignment interventions.