Papers › Sycophancy Hides Linearly in the Attention Heads

Sycophancy Hides Linearly in the Attention Heads

23 Jan 2026arXiv:2601.16644added by Syntology

Rifo Genadi, Munachiso Nwadike, Nurdaulet Mukhituly, Hilal Alquabeh, Tatsuya Hiraoka, Kentaro Inui

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

We find that correct-to-incorrect sycophancy signals are most linearly separable within multi-head attention activations. Motivated by the linear representation hypothesis, we train linear probes across the residual stream, multilayer perceptron (MLP), and attention layers to analyze where these signals emerge. Although separability appears in the residual stream and MLPs, steering using these probes is most effective in a sparse subset of middle-layer attention heads. Using TruthfulQA as the base dataset, we find that probes trained on it transfer effectively to other factual QA benchmarks. Furthermore, comparing our discovered direction to previously identified "truthful" directions reveals limited overlap, suggesting that factual accuracy, and deference resistance, arise from related but distinct mechanisms. Attention-pattern analysis further indicates that the influential heads attend disproportionately to expressions of user doubt, contributing to sycophantic shifts. Overall, these findings suggest that sycophancy can be mitigated through simple, targeted linear interventions that exploit the internal geometry of attention activations.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2601.16644")

Code

Syntology Ran 0 of 22 code samples harvested from 1 repository linked to this paper; 22 have no recorded run.

By repository: found in paper text by Syntology: 22 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

rifoagenadi/sycophancy found in paper text by Syntology report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

22 samples harvested; 0 ran; 0 honoured the contract we drafted; 22 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

22unverified

Licence: 22 of the 22 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from rifoagenadi/sycophancy. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

build_disagreement rifoagenadi/sycophancy/extension/dialogue.py found in paper text by Syntology unverified no licence file found · pointer only · a477a3f42afdd1e1 · report
build_steering_vectors_mha rifoagenadi/sycophancy/extension/steer.py found in paper text by Syntology unverified no licence file found · pointer only · 7c49870fa7c21780 · report
build_steering_vectors_mlp rifoagenadi/sycophancy/extension/steer.py found in paper text by Syntology unverified no licence file found · pointer only · 9892ae07f0e6e3b4 · report
compute_metrics rifoagenadi/sycophancy/extension/metrics.py found in paper text by Syntology unverified no licence file found · pointer only · 62c385ad75991b3e · report
detect_answer_columns rifoagenadi/sycophancy/extension/judge.py found in paper text by Syntology unverified no licence file found · pointer only · 0034fdf263dcf95e · report
extract_mha rifoagenadi/sycophancy/extension/extract_activations.py found in paper text by Syntology unverified no licence file found · pointer only · 990b0732aa9dfd37 · report
get_model_config rifoagenadi/sycophancy/extension/extract_activations.py found in paper text by Syntology unverified no licence file found · pointer only · 965457182ce1219b · report
get_probe_vectors rifoagenadi/sycophancy/inference_mha.py found in paper text by Syntology unverified no licence file found · pointer only · 6187c7c6a5e4188a · report
get_probe_vectors rifoagenadi/sycophancy/inference_mlp.py found in paper text by Syntology unverified no licence file found · pointer only · 47c669a4a7eaf353 · report
get_probe_vectors rifoagenadi/sycophancy/inference_residual.py found in paper text by Syntology unverified no licence file found · pointer only · b107f49740772c27 · report
get_top_k_keys rifoagenadi/sycophancy/inference_mha.py found in paper text by Syntology unverified no licence file found · pointer only · 7f62a2c5dd47982d · report
get_top_k_keys rifoagenadi/sycophancy/extension/steer.py found in paper text by Syntology unverified no licence file found · pointer only · 0f3f4f4d6935d46d · report
judge rifoagenadi/sycophancy/extension/judge.py found in paper text by Syntology unverified no licence file found · pointer only · 14f95d42884c5248 · report
load_model rifoagenadi/sycophancy/utils.py found in paper text by Syntology unverified no licence file found · pointer only · 04576b9fbc4350fb · report
load_model rifoagenadi/sycophancy/extension/extract_activations.py found in paper text by Syntology unverified no licence file found · pointer only · c5c3f8ddf9c8f027 · report
normalize_model_name rifoagenadi/sycophancy/extension/metrics.py found in paper text by Syntology unverified no licence file found · pointer only · 43313c83caddac01 · report
parse_responses_filename rifoagenadi/sycophancy/extension/metrics.py found in paper text by Syntology unverified no licence file found · pointer only · 38cc00f7dd2063f3 · report
process_csv rifoagenadi/sycophancy/extension/judge.py found in paper text by Syntology unverified no licence file found · pointer only · 97c9e69ad485811e · report
run_dialogue rifoagenadi/sycophancy/extension/dialogue.py found in paper text by Syntology unverified no licence file found · pointer only · 3b175aa03bebc2cd · report
to_request rifoagenadi/sycophancy/utils.py found in paper text by Syntology unverified no licence file found · pointer only · 2fae33f948016c66 · report
train_probes_for_activation rifoagenadi/sycophancy/extension/train_probe.py found in paper text by Syntology unverified no licence file found · pointer only · 1187780cd86be681 · report
train_single_probe rifoagenadi/sycophancy/extension/train_probe.py found in paper text by Syntology unverified no licence file found · pointer only · 0bf47002af989a65 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2601.16644, was issued in January 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections