SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.16644 · 2026

Sycophancy Hides Linearly in the Attention Heads

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

arXiv · PDF · Open in the Atlas

Code that ran

18 of 22 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 18 failures of our instrument; 4 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2601.16644.json · badge: /api/ran/2601.16644.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
rifoagenadi/sycophancy canonical (classifier label)
classifier basis: census
18 ran · 4 no recorded run
FunctionStatusWhere it lives
build_disagreement Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/dialogue.py
pointer only (licence: NONE) · get_code("a477a3f42afdd1e1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_steering_vectors_mha Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/steer.py
pointer only (licence: NONE) · get_code("7c49870fa7c21780")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_steering_vectors_mlp Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/steer.py
pointer only (licence: NONE) · get_code("9892ae07f0e6e3b4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_metrics Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/metrics.py
pointer only (licence: NONE) · get_code("62c385ad75991b3e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

detect_answer_columns Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/judge.py
pointer only (licence: NONE) · get_code("0034fdf263dcf95e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_mha Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/extract_activations.py
pointer only (licence: NONE) · get_code("990b0732aa9dfd37")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_model_config Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/extract_activations.py
pointer only (licence: NONE) · get_code("965457182ce1219b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_probe_vectors Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/inference_mlp.py
pointer only (licence: NONE) · get_code("47c669a4a7eaf353")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_probe_vectors Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/inference_residual.py
pointer only (licence: NONE) · get_code("b107f49740772c27")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_top_k_keys Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/inference_mha.py
pointer only (licence: NONE) · get_code("7f62a2c5dd47982d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_top_k_keys Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/steer.py
pointer only (licence: NONE) · get_code("0f3f4f4d6935d46d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

judge Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/judge.py
pointer only (licence: NONE) · get_code("14f95d42884c5248")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

normalize_model_name Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/metrics.py
pointer only (licence: NONE) · get_code("43313c83caddac01")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

parse_responses_filename Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/metrics.py
pointer only (licence: NONE) · get_code("38cc00f7dd2063f3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

run_dialogue Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/dialogue.py
pointer only (licence: NONE) · get_code("3b175aa03bebc2cd")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

to_request Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/utils.py
pointer only (licence: NONE) · get_code("2fae33f948016c66")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

train_probes_for_activation Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/train_probe.py
pointer only (licence: NONE) · get_code("1187780cd86be681")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

train_single_probe Ran
ran; our contract draft was wrong, not the code
rifoagenadi/sycophancy/extension/train_probe.py
pointer only (licence: NONE) · get_code("0bf47002af989a65")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_probe_vectors Not yet run
unverified (harvested, no recorded run)
rifoagenadi/sycophancy/inference_mha.py
pointer only (licence: NONE) · get_code("6187c7c6a5e4188a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
rifoagenadi/sycophancy/utils.py
pointer only (licence: NONE) · get_code("04576b9fbc4350fb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
rifoagenadi/sycophancy/extension/extract_activations.py
pointer only (licence: NONE) · get_code("c5c3f8ddf9c8f027")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

process_csv Not yet run
unverified (harvested, no recorded run)
rifoagenadi/sycophancy/extension/judge.py
pointer only (licence: NONE) · get_code("97c9e69ad485811e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rifoagenadi/sycophancy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 22 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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 middlelayer 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. The code for our experiments can be accessed at https: //github.com/rifoagenadi/sycophancy

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2601.16644")
get_code_for_paper("2601.16644")
have("2601.16644")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2601.16644.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2601.16644.svg)](https://syntology.ai/paper/2601.16644)

Connect an agent — have() is free.