agentleFS
zjunlpzjunlp/Mechanist/skills/experiment-tips/steering-block-selection/SKILL.md

steering-block-selection

Skill75 starsChanged 4 months agoMITView on GitHub

How to choose where (and how many sites) to intervene for any operation on internal representations — activation patching, steering, CAA, DAS, SAE feature scaling, attribution patching. Use whenever the plan declares a target block / layer / site, especially when it hard-codes a single index (`target_block: 4`, `layer: 16`) without justification or copied from another paper. Covers picking the site by screening (gradient / attribution, or an activation signal) and by heuristic (mid-to-late layers usually steer best; widen to 3–5 layers if one is inert; sweep the stack at spaced intervals), and which component to target (attention / MLP / residual stream — circuit discovery studies attention heads + MLP). Prevents two symmetric failures: too few sites → downstream norm/attention denoise it → false "no effect"; too many → off-distribution collapse and the localization claim becomes untestable. Triggers include `target_block = 4`, `sliding window = 15`, `layer ∈ [12,18]`, `early blocks (0-7)`, "steering had no effect" while the same coefficient at a window did.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If a single layer shows no effect, intervene on 3–5 layers instead.

    line 25

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Steering Block / Layer Selection

The point

Where and how many sites you intervene on changes both the effective strength of the intervention and whether a localization claim is testable.

  • Too few (single site on a deep stack) → downstream norm/attention denoise it → looks like "no effect".
  • Too many (whole stack) → off-distribution collapse → the effect is collapse-driven and no longer localized.

Choosing where to intervene

Pick the site(s) by a screening method, by heuristic, or both.

By method (pre-screen the layers):

  • Gradient-based — rank layers by gradient / attribution score w.r.t. the target.
  • Activation-based — rank by an activation signal (probe accuracy, diff-mean magnitude, separability).

By heuristic:

  1. Mid-to-late layers usually work best — start there.
  2. If a single layer shows no effect, intervene on 3–5 layers instead.
  3. To sweep the whole stack, use spaced intervals (e.g. every 2–3 layers) rather than every layer.

What to intervene on (transformer)

Target the attention, the MLP, or the residual stream — choose by what the claim is about.

Note: circuit discovery generally studies attention heads + MLP.

Two rules to keep it honest

  • Match the claim. If the claim is about a region (e.g. "early layers 0–7"), intervene on a window covering that region and use matched windows elsewhere as null controls — a single site can't adjudicate a regional claim. Report the localization you actually observe; don't rewrite the claim to fit the data.
  • Never copy a raw index across models of different depth. "Layer 16 of 32" → scale by relative depth (0.5 → layer 24 of 48), then check neighbors.

Composition

Lock the site set here first (the coefficient plateau is site-dependent), then sweep α via ../steering-coefficient-tuning/. Re-sweep the coefficient whenever the site set changes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.