Extracting Steering Vectors from J space
Recorded: Sept. 8, 2026, 2:09 p.m.
| Original | Summarized |
Extracting Steering Vectors from the J Space | Darshan Makwana Darshan Makwana BlogsAboutBookmarksBirdingRunning Extracting Steering Vectors from the J Space Sep 4, 2026 I was reading about the jacobian space and how it can be used to verbalize the intermediate activations of an LLM to decode what it is most likely going to say or is thinking about. I wanted to test if we can use the j lens to arrive at a general activation steering vector from a couple of tokens related to the concept towards which we wanted to steer the model i.e inverting the j lens to have a general method of finding steering vectors from the concept tokens Alright so our baseline comparison steering vectors work fine We find that the vector a_upper - a_lower derived from J lens is closer to the activation vector of all caps tokens. They also have very high cosine similarity score compared to replacing the J lens with an identity operation in which case it becomes just a logit lens Let’s now take an average of all activation diffs of all such pairs and comparing it with our baseline earlier it definitely steers the model towards generating all caps tokens/words Refusal Steering As expected it’s thinks about words/tokens related to refusal behaviour. Inverting just a single refusal word/token with a neutral token did not work this time as the single refusal tokens could relate lots of concepts and inverting it does not have enough information passed via the J lens to arrive at a refusal activation vector Collect 20-30 words/tokens that relate/ellicit to the concept/behaviour towards which we want to steer the model Now let’s compute this for refusals and stop at step 4 and then run the activation vector we got from step 4 and visualize what the model generates using that activation vector on arbitrary prompts We observe that the model shows signs and behaviour of telling user not to do certain things. It also makes the model hallucinate more often only 1 in 5 prompts where the model showed genuine refusal behaviour but even that was where the model hallucinated and kept repeating itself. The activation is really noisy and brittle to use as it is. Let’s evaluate on the 10 prompts we evaluated our baseline steering vector on by subtracting the average activation we got after inverting the J lens over the entire vocabulary It’s way behind the baseline score yet, the reparations are gone but it still hallucinates often or only mentions not to do certain things or stop things are mentioning them first. Direct refusal rates are still low Tags: |
The investigation focused on utilizing the Jacobian space, or J lens, to derive general activation steering vectors from concept tokens to decode the intermediate activations of a large language model and steer its behavior. The core hypothesis tested was whether the J space could provide a general method for finding these steering vectors by inverting the J lens based on concept tokens. To establish a baseline, the author referenced existing steering vectors derived from fine-tuning or abliteration techniques on Qwen3-1.7B models, providing starting points for comparison. For instance, the steering vector associated with all caps behavior was obtained via finetuning, and a separate steering vector for refusal was derived by analyzing an abliterated model for refusal behavior. The method explored using the J space to derive the all caps steering vector involved pairing all caps tokens with their lowercase counterparts across the vocabulary, inverting the corresponding J lens rows, projecting these activation vectors using principal component analysis, and comparing them against the established baseline. The comparison indicated that the activation vector derived from the difference between the upper and lower-case activations provided a vector closely aligned with the expected all caps steering vector, demonstrating high cosine similarity relative to identity operations. Averaging these differences further refined the steering vector toward generating all caps tokens. For steering the model toward refusal, the approach involved gathering sets of concept tokens related to refusal behavior. The initial attempt to invert the J lens for a single refusal word or tokenize set proved insufficient because a single token can encompass multiple concepts, limiting the information passed through the J lens. Therefore, an iterative generalization algorithm was developed. This method involves collecting a pool of twenty to thirty refusal-related tokens, sampling sets of five tokens with replacement from this pool, computing activation vectors by inverting the Jacobian over these sampled tokens, repeating this process $K$ times to collect multiple activation vectors, and then averaging them to approximate the activation most likely to elicit refusal thinking. This resulting average activation was then subtracted from the average activation over the entire vocabulary to yield the final steering vector. When applying this derived refusal steering vector to prompts, the results were observed to be noisy and brittle; while the model exhibited signs of telling the user not to do certain things, it often led to hallucinations or repetition rather than genuine refusal behavior. Analysis of the verbalized outputs indicated the activation forced the model to focus on specific tokens such as "even," "only," "but," "forbidden," and "not." This suggested that the steering vector influenced the generation of these words without directly transferring the intended refusal behavior. The author concluded that a major limitation for steering complex behaviors is that representing them solely through discrete tokens or using only the J space sacrifices the necessary information required to articulate or represent those complex cognitive behaviors within the activation space. |