Feature Clamping

Clamping is a method of artificially modifying the activation values of specific features in a neural network during the forward pass of making a prediction. Instead of letting a feature's activation emerge naturally from the input, you override it and hold it at a value you choose.

By clamping different features high or low and observing how the model's behavior changes, you can test whether your interpretation of what a feature represents, or what it influences, was actually correct. This turns a hypothesis about a feature's meaning into a causal experiment.

Clamping

a=ca' = c

aa is the feature's original activation and cc is the fixed value you clamp it to, replacing aa regardless of what the input would otherwise produce.

Clamping is more binary or absolute in nature: you are forcing a feature into a particular state and holding it there, rather than nudging it. It is often used diagnostically to verify feature interpretations by observing behavior when a feature is turned off (clamped to zero) or maxed out (clamped far above its typical activation range).

If a feature has been labeled "Golden Gate Bridge," clamping it to zero should remove bridge-related content even from prompts that would normally evoke it, and clamping it to a very high value should inject bridge content even into prompts that have nothing to do with it. Either result is evidence about what the feature is doing; the absence of either result is evidence that the label is wrong or incomplete.

Side-by-side comparison of Claude's default response denying a physical form versus its response after the Golden Gate Bridge feature was clamped to 10x its max activation, describing itself as the bridge
Anthropic clamped a "Golden Gate Bridge" feature to 10x its max activation. The resulting model, nicknamed Golden Gate Claude, described itself as the bridge regardless of what it was asked. Source: Anthropic, "Scaling Monosemanticity" (2024).

Clamp or Steer a Feature

Intervene on a learned Golden Gate Bridge feature. Clamping overwrites its activation. Steering adds a scaled decoder direction to the model's existing state.

a' = a + αd = 0.35 + 1.0(0.35)
feature activation = 0.700
Golden Gate Bridge token evidence0.40
Unrelated safety instruction evidence0.42
Model continuation: The answer naturally mentions the Golden Gate Bridge.
A useful intervention changes the target behavior gradually while preserving unrelated behavior. Watch both logits.

Golden Gate Claude is a fun demonstration, but it is also a template for a more serious diagnostic. Researchers studying safety-relevant behavior in language models have found and clamped features labeled "unsafe code," "code error," and "backdoor." Clamping these features high pushes the model toward writing code with the corresponding flaw, even on prompts where nothing in the request suggests a problem; clamping them to zero can suppress that behavior on prompts that would otherwise trigger it. The figure below shows examples of text that produces high activations of these features.

Safety-relevant feature clamping example, slide 1

Safety-relevant feature clamping experiments. Source: Anthropic, "Scaling Monosemanticity" (2024).

The stakes here are different from a novelty chatbot. If clamping a "backdoor" feature reliably makes a coding model insert exploitable flaws, that is causal evidence the feature tracks something real and dangerous, not just a coincidental label from a handful of examples. Clamping experiments like these are part of how labs build confidence that a safety-relevant feature is what they think it is, before relying on it to monitor or intervene on model behavior in production.

Checkpoint

A team labels a feature "backdoor" from its top activating examples. What clamping experiment would best test whether that label is accurate?