← Mathematical compendium

Published equation contexts

vℓ=1∣P∣∑i∈Phℓ(xi+)  −  1∣N∣∑i∈Nhℓ(xi−),hℓ←hℓ+α vℓv_\ell = \frac{1}{|P|}\sum_{i \in P} h_\ell(x_i^{+}) \;-\; \frac{1}{|N|}\sum_{i \in N} h_\ell(x_i^{-}), \qquad h_\ell \leftarrow h_\ell + \alpha\, v_\ell

Why this formula appears here

The construction is a mean-difference direction, added back into the residual stream with a tunable strength at inference time: vℓ=1∣P∣∑i∈Phℓ(xi+)  −  1∣N∣∑i∈Nhℓ(xi−),hℓ←hℓ+α vℓv_\ell = \frac{1}{|P|}\sum_{i \in P} h_\ell(x_i^{+}) \;-\; \frac{1}{|N|}\sum_{i \in N} h_\ell(x_i^{-}), \qquad h_\ell \leftarrow h_\ell + \alpha\, v_\ell. where P and N index matched positive and negative examples of the target behaviour, hℓh_\ell is the residual-stream activation at layer ℓ\ell , and α\alpha is a coefficient the operator sets by hand. Nothing in this construction requires understanding why the network represents the concept along this direction, only that adding it produces the intended behavioural shift.

Read the full article-specific guide →

Read the representative guide

PP

Symbol P

P occurs below the fraction bar. The quantity above the bar is divided by this expression; zero is excluded as a denominator.

Read this term in its guide →
ii

Symbol i

i appears in the bound of this sum. The bound states where the repeated operation starts, ends, or which values it includes.

Read this term in its guide →
NN

Symbol N

N occurs below the fraction bar. The quantity above the bar is divided by this expression; zero is excluded as a denominator.

Read this term in its guide →
xi−x_i^{-}

Symbol x_i^-

xi−x_i^- is one of the signed contributions combined to compute the quantity on the left.

Read this term in its guide →
i∈Pi \in P

Starting index or lower bound: i in P

This label says where the repeated addition, multiplication, or accumulation starts. Read its value or condition together with the article’s description of the index.

Read this term in its guide →
i∈Ni \in N

Starting index or lower bound: i in N

This label says where the repeated addition, multiplication, or accumulation starts. Read its value or condition together with the article’s description of the index.

Read this term in its guide →

How to interpret it

With a fixed numerator, increasing a nonzero denominator reduces the fraction. Read it with the definitions, units, and assumptions supplied by the article.

Research cited beside this formula

Published contexts (1)

A symbol can carry a different meaning in another article. Each occurrence keeps its own guide and term definitions.

vℓ=1∣P∣∑i∈Phℓ(xi+)  −  1∣N∣∑i∈Nhℓ(xi−),hℓ←hℓ+α vℓ,v_\ell = \frac{1}{|P|}\sum_{i \in P} h_\ell(x_i^{+}) \;-\; \frac{1}{|N|}\sum_{i \in N} h_\ell(x_i^{-}), \qquad h_\ell \leftarrow h_\ell + \alpha\, v_\ell,

Equation 25 · AI Research

Probing, Sparse Autoencoders, Patching, and Steering: The Main Interpretability Methods, Compared

This equation states an equality: the expressions on both sides have the same value under the article’s assumptions.

The construction is a mean-difference direction, added back into the residual stream with a tunable strength at inference time: vℓ=1∣P∣∑i∈Phℓ(xi+)  −  1∣N∣∑i∈Nhℓ(xi−),hℓ←hℓ+α vℓv_\ell = \frac{1}{|P|}\sum_{i \in P} h_\ell(x_i^{+}) \;-\; \frac{1}{|N|}\sum_{i \in N} h_\ell(x_i^{-}), \qquad h_\ell \leftarrow h_\ell + \alpha\, v_\ell. where P and N index matched positive and negative examples of the target behaviour, hℓh_\ell is the residual-stream activation at layer ℓ\ell , and α\alpha is a coefficient the operator sets by hand. Nothing in this construction requires understanding why the network represents the concept along this direction, only that adding it produces the intended behavioural shift.

Meanings in this article

Equation guide → · Article →