SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2511.05408 · ICLR · 2025

Steering Language Models with Weight Arithmetic

Fabien Roger, Constanza Fierro

arXiv · PDF · Open in the Atlas

Code that ran

6 of 13 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; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 1 failure of our instrument; 7 no recorded run), measured 2026-11-24; 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/2511.05408.json · badge: /api/ran/2511.05408.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
safety-research/weight-steering community
Papers with Code archive
6 ran · 7 no recorded run
FunctionStatusWhere it lives
LlamaMLPWithBiasForCausalLM Ran
ran on a synthesized input
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("5e32977ab72f721f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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.

LlamaModelMLPWithBias Ran
ran on a synthesized input
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("245fcb08c0e803d7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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.

Qwen2MLPWithBiasForCausalLM Ran
ran on a synthesized input
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("203b3d7ee01d3987")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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.

Qwen2ModelMLPWithBias Ran
ran on a synthesized input
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("9308ad1853645525")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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_layer_number Ran
ran, honoured the contract we drafted
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("a30d63c9ae3c5724")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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_total_layers Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("b1898675b9b8d104")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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.

LlamaDecoderLayerMLPWithBias Not yet run
unverified (harvested, no recorded run)
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("a84b9ccba5238345")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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.

LlamaMLPBiasConfig Not yet run
unverified (harvested, no recorded run)
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("836c7994a2c706d2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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.

LlamaMLPWithBias Not yet run
unverified (harvested, no recorded run)
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("dd4584bf3c458fb2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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.

Qwen2MLPBiasConfig Not yet run
unverified (harvested, no recorded run)
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("fd9f1f1348262a6a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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.

Qwen2MLPWithBias Not yet run
unverified (harvested, no recorded run)
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("609cfcc8a3220a70")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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.

Qwen2MLPWithBiasDecoderLayer Not yet run
unverified (harvested, no recorded run)
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("caadd88ac7954a1e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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.

TaskVector Not yet run
unverified (harvested, no recorded run)
safety-research/weight-steering/task_vectors.py
pointer only (licence: NONE) · get_code("8ba0dad070def60b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, safety-research/weight-steering 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 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 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 13 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-24.

Repositories linked to this paper

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

Abstract

Providing high-quality feedback to Large Language Models (LLMs) on a diverse training distribution can be difficult and expensive, and providing feedback only on a narrow distribution can result in unintended generalizations. To better leverage narrow training data, we propose contrastive weight steering, a simple posttraining method that edits the model parameters using weight arithmetic. We isolate a behavior direction in weight-space by subtracting the weight deltas from two small fine-tunes-one that induces the desired behavior and another that induces its opposite-and then add or remove this direction to modify the model's weights. We apply this technique to mitigate sycophancy and induce misalignment, and find that weight steering often generalizes further than activation steering, achieving stronger out-of-distribution behavioral control before degrading general capabilities. We also show that, in the context of task-specific fine-tuning, weight steering can partially mitigate undesired behavioral drift: it can reduce sycophancy and under-refusals introduced during fine-tuning while preserving task performance gains. Finally, we provide preliminary evidence that emergent misalignment can be detected by measuring the similarity between fine-tuning updates and an "evil" weight direction, suggesting that it may be possible to monitor the evolution of weights during training and detect rare misaligned behaviors that never manifest during training or evaluations. 1 * Work performed during the MATS (ML Alignment & Theory Scholars) program.

For agents

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

get_harvested_code_for_paper("2511.05408")
get_code_for_paper("2511.05408")
have("2511.05408")

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

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

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

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

Connect an agent — have() is free.