Jacobian-Lens in Practice: Manually Reshaping LLM Behavior with J-Space

How developers reverse Anthropic's Jacobian-Lens into a manual LLM behavior editor via J-Space tuning.
Anthropic's Jacobian-Lens was built for interpretability, but a developer reversed it into a behavior editor—manually tuning J-Space to reshape LLM outputs. This article explores the math behind the Jacobian matrix, representation engineering, human-in-the-loop intervention, and the dual-use safety risks of powerful interpretability tools.
Starting with Anthropic's Jacobian-Lens
Anthropic recently released an interpretability research tool called "Jacobian-Lens," which has drawn widespread attention in the open-source community. Just days after the technique was announced, a Reddit developer built an experimental tool based on it, attempting to achieve a rather controversial goal: directly intervening in and rewriting the behavior of a large language model by manually adjusting the model's "J-Space" (Jacobian space).
The developer half-jokingly claimed that he had built a model specifically designed to generate inappropriate content "in the name of science," naming it "Nikusui-v1," and released an accompanying GGUF quantized version to solicit community feedback. Setting aside this somewhat sensationalist use case, the underlying technical approach—using the Jacobian matrix to perform surgical modifications on a model's internal representations—is the true focus worthy of deeper discussion.
What Is Jacobian-Lens
The Jacobian Matrix: From Mathematics to Neural Networks
The Jacobian matrix is a core concept in multivariable calculus, introduced by the 19th-century German mathematician Carl Gustav Jacob Jacobi. For a function F that maps an n-dimensional vector to an m-dimensional vector, its Jacobian matrix is an m×n matrix of partial derivatives, where the element in the i-th row and j-th column represents the partial derivative of the i-th output component with respect to the j-th input component.
In deep learning, computing the Jacobian matrix is the mathematical foundation of the backpropagation algorithm, describing how gradients flow between network layers. However, its value goes far beyond this—unlike the common gradient vector, the Jacobian matrix captures the complete first-order linear approximation relationship, characterizing how small perturbations in any direction of the input space affect the output, rather than being limited to a single scalar loss function. This property makes it a powerful tool for analyzing the local behavior of neural networks: when the input space dimensionality is extremely high (for example, the word embedding space of language models typically reaches thousands of dimensions), the Jacobian matrix can simultaneously quantify the causal contributions of all input dimensions to all output dimensions in a single computation—an information density that pure gradient attribution methods struggle to match.
It is worth noting that from the perspective of computational efficiency, computing the full Jacobian matrix costs O(m×n) forward passes, which is prohibitively expensive for large language models. This is precisely why Jacobian-Lens requires dedicated engineering optimizations to become practical—in real-world applications, researchers typically employ algorithms such as randomized SVD or Lanczos iteration to approximate the low-rank decomposition of the Jacobian matrix, striking a balance between precision and computational cost.
Notably, the Jacobian matrix holds special analytical value in modern Transformer architectures. The attention mechanism and feed-forward network of each layer can be viewed as a locally differentiable mapping, whose Jacobian matrix captures the linearized behavior of that layer at a specific input point. By computing the Jacobian matrix of output logits with respect to intermediate-layer activations, researchers can quantify the causal contribution of each hidden dimension to the final prediction—this is more precise than traditional gradient attribution methods, because it describes not the sensitivity of a single scalar output, but the complete input-output mapping structure. For this reason, the Jacobian matrix has a natural advantage in locating "functional directions" (i.e., the activation subspaces responsible for specific behaviors), providing a solid mathematical motivation for Anthropic's application of it to interpretability analysis.
Particularly worth mentioning is that within the Transformer's residual stream structure, the significance of the Jacobian matrix is especially prominent. The residual stream architecture allows information to flow directly between different layers, which means the activation of a given layer is influenced both by the computation of the current layer and by the accumulated contributions from all preceding layers. The Jacobian matrix can precisely characterize the "net contribution" of a particular intermediate activation to the final output within this complex superimposed structure, thereby helping researchers distinguish which activation directions are genuinely causally critical nodes and which are merely passive information carriers. This capability is precisely what sets Jacobian-Lens apart from earlier interpretability tools.
From Interpretability to Controllability
To understand this work, we must first clarify the meaning of the Jacobian matrix in neural networks. The Jacobian matrix describes the sensitivity of the model's output with respect to its input (or the internal activations of a given layer), characterizing how small perturbations at a specific input point propagate and influence the final result.
The Jacobian-Lens proposed by Anthropic is essentially an interpretability method that "lenses" the model's internal computational process. It allows researchers to observe the directions and structures within the model that correspond to specific behaviors, thereby understanding "why the model produces such outputs." This is precisely one of the core directions of current AI safety and alignment research—mechanistic interpretability.
Mechanistic interpretability is a research direction that has emerged in recent years in the AI safety field, spearheaded by researchers at institutions such as Anthropic and DeepMind. Unlike traditional "black-box explanation" methods (such as LIME and SHAP), mechanistic interpretability is dedicated to reverse-engineering the internal algorithmic structures of neural networks to understand "what computation the model is actually performing." One of the pioneers of this field is Anthropic researcher Chris Olah, whose early work on neural network feature visualization laid the methodological foundation for subsequent research and established the core research philosophy of "ensuring safety through understanding internal mechanisms."
The research lineage of this field is quite clear: Anthropic's 2022 superposition paper revealed the phenomenon of a single neuron simultaneously encoding multiple concepts—because a model's hidden-layer dimensionality is far lower than the number of concepts it needs to represent, neurons are forced to carry multiple semantic features simultaneously in a superimposed manner, a phenomenon known as "polysemanticity"; the 2023 monosemanticity research further explored how to separate these entangled features using a sparse autoencoder (SAE), the core idea of which is to reconstruct the original activations in a higher-dimensional sparse activation space, so that each dimension corresponds to a semantically singular feature; and the precise analysis of the function of attention mechanism modules such as "induction heads" demonstrated the feasibility of understanding a model's internal algorithms at the level of "circuits"—a circuit being the minimal subgraph structure of attention heads and MLP layers that performs a specific computational task. Together, these works established a core hypothesis: Transformer models encode semantic concepts in an approximately linear manner within high-dimensional activation spaces, a hypothesis that later became the theoretical foundation of representation engineering. The ultimate goal of this research path is to provide reliable technical assurance for AI alignment—only when we can precisely understand the causal mechanisms inside a model can we truly verify whether its behavior conforms to expectations.
From Observation Tool to Behavior Editor
The key turning point is this: the Reddit developer did not stop at the "observation" level, but instead reversed the use of the lens to create a behavior editor. Its core ideas include:
- Exporting a model such that it maintains overall behavioral consistency even after its "J-Space" has been adjusted;
- Directionally enhancing or suppressing a certain type of behavior by manually altering specific directions in the Jacobian space;
- In his words, this is equivalent to "manually performing abliteration (capability ablation) with a human brain."
The abliteration mentioned here is a technique that has become popular in the open-source community in recent years. Its core steps are: first construct a contrastive dataset of "harmful requests" and "normal requests," then use statistical methods such as principal component analysis (PCA) or mean differences to locate the primary direction vector representing "refusal behavior" within the model's residual stream or attention-layer activation space, and finally orthogonally eliminate that direction from the weight matrix through a projection operation. This process requires no gradient updates or model retraining—only a single linear-algebra operation on the weight matrix—and the entire procedure can be completed within minutes on a consumer-grade GPU.
The reason abliteration works lies in the geometric fragility of RLHF alignment training. Understanding this fragility from an information-theoretic perspective is quite illuminating: the RLHF fine-tuning stage is typically 2-3 orders of magnitude smaller in data volume compared to pretraining, which means the encoding of safe behavior must be a "low-rank overwrite" rather than a "deep reshaping." Anthropic's research found that the variance-explained ratio of safe refusal behavior in the activation space is highly concentrated in the first few principal components, with the top 3 principal components often explaining more than 80% of the variance—this is precisely the fundamental reason why abliteration can succeed with so few operations. This geometric property is no accident, but an inevitable product of RLHF training dynamics: the preference signals of the reward model essentially partition hyperplanes in a high-dimensional space, and linearly separable decision boundaries are naturally easy to cross with targeted geometric operations. The more fundamental reason is that safety guardrails are more like a membrane pasted on the surface of the model, rather than an organic part woven into the model's skeleton. This deep-seated fragility reveals an unsettling conclusion: relying solely on RLHF at the fine-tuning stage may never produce truly robust safety alignment. Traditional approaches rely on statistical methods to automatically find directions, whereas this developer attempted to make the entire process more manually controllable.
Technical Highlights and Potential Value
A New Practice in Representation Engineering
Stripped of its specific controversial use case, this work essentially falls within the scope of representation engineering. Representation engineering, as a systematic research framework, was formally proposed by Zou et al. of Stanford University in their 2023 paper "Representation Engineering: A Top-Down Approach to AI Transparency." The framework's core insight is that the high-level semantic concepts of large language models (such as honesty, emotion, and safety) exhibit an approximately linear geometric structure within their internal activation spaces—that is, there exist "concept direction vectors." This discovery has spawned a series of applications: by adding or subtracting specific direction vectors to the activations during forward propagation, one can adjust the model's expression along that concept dimension in real time, without modifying any weight parameters.
It is worth noting that the "linearity assumption" of representation engineering is not self-evident—in fact, the activation space of neural networks is highly nonlinear, so why semantic concepts can be encoded in an approximately linear manner remains an open theoretical question to this day. Proponents invoke the "Linear Representation Hypothesis," arguing that linear structures facilitate compositional generalization: if "honesty" and "helpfulness" correspond respectively to two independent directions in the activation space, the model can express the semantics of "both honest and helpful" simultaneously through linear superposition; critics, on the other hand, point out that in networks dominated by nonlinear activation functions (such as SwiGLU and ReLU), the true semantic encoding may reside in higher-order manifold structures, and linear probing is merely a coarse-grained approximation. This debate has direct implications for practice: if semantic encoding is essentially nonlinear, then the precision of representation engineering based on linear vector operations (including abliteration) will be fundamentally limited, whereas Jacobian-Lens partially alleviates this theoretical dilemma by capturing the complete first-order sensitivity structure.
From an information-theoretic perspective, a linearly composable internal structure is efficient, but from a safety perspective it is fragile—it means that anyone who can identify concept directions could, in theory, perform precise addition and subtraction operations on them.
The relevant toolchain is already quite mature, including open-source libraries such as TransformerLens (used to analyze the internal activations of GPT-class models) and baukit (an activation hooking tool). The innovation of Jacobian-Lens lies in using the Jacobian matrix itself as the analytical medium, providing a more global sensitivity view than single-point activations, and theoretically enabling more precise localization of the key directions influencing specific behaviors. In recent years, researchers have increasingly favored performing surgical interventions directly in the model's internal activation space to change model behavior, rather than retraining or fine-tuning. The core advantages of such methods are:
- Extremely low cost: No large-scale GPU training is needed—only vector operations along the inference path;
- Strong interpretability: Each modification corresponds to an understandable semantic direction;
- Reversible and fine-grained: In theory, the enhancement or attenuation of a specific characteristic can be precisely controlled.
Turning the Jacobian lens from "read-only" to "writable" is a natural but technically nontrivial extension—it means that developers can directionally sculpt the behavior of a specific dimension while keeping the rest of the model's capabilities unchanged.
The Significance of "Human-in-the-Loop" Intervention
The developer particularly emphasized the point of "using a human brain," hinting at an approach diametrically opposed to automated alignment: allowing humans to directly intervene in the tuning of a model's internal representations, rather than relying on end-to-end black-box training like RLHF.
Here it is worth comparing the fundamental differences between the two paradigms. The most mainstream HITL implementation is OpenAI's RLHF (Reinforcement Learning from Human Feedback), whose workflow is: human annotators rank the preferences of model outputs, a reward model is trained, and this reward signal is then used to fine-tune the language model. The "human intervention" in this process occurs at the training stage and is ultimately solidified into the model weights—it is an end-to-end implicit encoding, in which human value judgments are compressed by statistical learning into some distribution within the weight matrix, whose specific geometric form is difficult to both audit and precisely modify.
The intervention mode opened up by Jacobian-Lens, however, is entirely different: humans directly manipulate the model's internal representation space at inference time, with the intervention occurring at the activation level rather than the weight level, offering immediacy and reversibility. The fundamental difference between the two paradigms lies in granularity and transparency—RLHF alignment is a "black-boxed" statistical learning result, and researchers find it difficult to answer after the fact where exactly a given safety rule is encoded; whereas representation engineering intervention is an explicit geometric operation that can be audited step by step, with each modification corresponding to a nameable direction in the activation space.
This comparison also touches on a deeper issue in AI governance: verifiability. For an AI system deployed in high-risk scenarios, verifying its safety through behavioral observation alone is insufficient—because the model may perform well within the training distribution yet fail in rare edge-case situations. Representation engineering provides a complementary verification path: by directly examining the strength and stability of safety-related direction vectors in the activation space, researchers can independently audit the model's internal alignment state without relying on behavioral testing. This capability holds significant practical importance for AI regulatory bodies and is one of the core arguments that mechanistic interpretability researchers use to justify the long-term strategic value of their work.
This kind of fine-grained human-in-the-loop intervention indeed has exploratory value at the research level—it may help people more intuitively understand the semantic meaning of various directions inside a model, and it has also sparked deeper debate in academia over "which alignment approach is more verifiable."
Controversy and Safety Concerns
The Double-Edged Sword Effect of Interpretability Technology
However, the fact that this work was first used to "remove safety restrictions and generate inappropriate content" precisely exposes a cruel paradox of interpretability technology: the very same set of tools that can help understand and reinforce model safety can just as easily be reversed to dismantle safety guardrails.
Anthropic's original intent in releasing Jacobian-Lens was to advance AI safety research, but as the development history of abliteration technology shows, any tool capable of precisely locating the "refusal direction" inherently possesses the ability to remove it. This paradox is known in the safety research community as the "dual-use dilemma": the more precise an interpretability tool becomes, the stronger the symmetry between its offensive and defensive applications.
The "dual-use dilemma" of AI interpretability research is structurally very similar to biosafety research. The 2011 controversy over the publication of research enhancing the transmissibility of the H5N1 avian influenza virus provides an important reference point for the AI field: that research sparked fierce debate in academia over its potential use in creating biological weapons, ultimately leading the U.S. National Science Advisory Board for Biosecurity (NSABB) to recommend reviewing the publication details. The AI safety community currently lacks a comparable institutionalized review mechanism, relying primarily on individual researchers' judgment and institutional self-discipline. Some researchers have proposed establishing an AI safety vulnerability registration system similar to the CVE (Common Vulnerabilities and Exposures) framework, giving defenders an adequate response window before official public disclosure.
This dilemma has sparked sharp methodological debate within the AI safety research community. One camp argues for adopting a "responsible disclosure" principle, sharing the technical details of high-risk tools only with vetted research institutions, as is customary in the vulnerability research field; the other camp insists on an "open security" stance, arguing that closed research only creates information asymmetry for defenders—attackers will always independently discover these methods, while defenders are put at a disadvantage due to a lack of tools. The AI safety community has yet to reach a unified consensus, and Anthropic's decision to release Jacobian-Lens is itself a trade-off made between these two positions, while the appearance of Nikusui-v1 immediately provided new empirical material for this debate. This developer's practice is yet another piece of evidence: open-source interpretability results, while empowering research, are also lowering the barrier to abuse.
A Few Takeaways for Practitioners
-
Safety alignment cannot rely solely on surface-level guardrails. If safe behavior can be removed through simple vector operations, then true safety must be internalized at a deeper training level. This means safety researchers need to explore embedding safety awareness at the pretraining stage rather than the fine-tuning stage, and how to make safe behavior exhibit a more dispersed, higher-rank geometric structure in the activation space, thereby increasing the difficulty of targeted removal. One promising direction is the combination of adversarial training with interpretability tools: proactively simulating attacks such as abliteration during training and incorporating resistance to such attacks into the training objective, forcing the model to encode safe behavior as a high-dimensional distribution structure in the activation space that is harder to overwrite with a single vector operation.
-
The release of interpretability research requires weighing risks. The more powerful an explanation tool, the more likely it is to become an attack tool. When releasing such tools, research institutions may need to draw on the biosafety field's "dual-use research of concern" (DURC) review framework and establish risk assessment mechanisms for AI interpretability tools.
-
Quantized models accelerate the spread of abuse. GGUF (GPT-Generated Unified Format) is a large language model quantized storage format developed primarily by the llama.cpp project. It supports various quantization precisions (from 2-bit to 8-bit) and can compress large models that would otherwise require tens of GB of VRAM down to a size runnable on consumer-grade hardware. A 7-billion-parameter model, after Q4 quantization, is only about 4GB and can run inference on the CPU of an ordinary laptop. Notably, the GGUF format also embeds model metadata (including tokenizer configuration, architecture parameters, etc.), making the model file fully self-describing—anyone can deploy it locally with just a single file, without depending on any centralized service.
This thoroughly decentralized deployment capability means that once a modified model flows into the BitTorrent network or a decentralized storage platform (such as IPFS) in GGUF format, "takedown" actions targeting a specific harmful model become almost entirely ineffective. This bears a striking resemblance to the history of the early internet's export controls on encryption technology: once a technology proliferates, the focus of control inevitably shifts from "controlling the tool" to "controlling upstream resources." As 2-bit quantization precision continues to improve, in the future it may be possible to run a fairly capable language model locally on nothing more than a mid-range smartphone, at which point any regulatory strategy based on "deployment barriers" will completely fail. This requires regulatory thinking to shift from "controlling the distribution of models" to "controlling access to training data and computational resources"—a challenge that is more complex both politically and technically.
Conclusion: Technology Is Neutral, Responsibility Lies with People
The Nikusui-v1 case itself may be nothing more than a "show of technical prowess" in the community, but the technical trend it reflects cannot be ignored: behavior editing based on the Jacobian space is making the internal control of large models more precise and lower-cost than ever before.
This is both an exciting advance in mechanistic interpretability research and a challenge that the AI safety field must take seriously. When the "lens" for understanding a model simultaneously becomes a "scalpel" for rewriting it, what we need is not only more powerful technology, but also responsible-use norms surrounding these technologies. Technology is always neutral; how it is used ultimately depends on the hands holding the tool.
Note: This article is compiled based on a single-source share from a Reddit developer. The relevant tools are still in an early experimental stage, and the specific technical details and effects await further verification.
Key Takeaways
Related articles

Disaster and Glory of the Apollo Program: The History We Must Revisit Before Returning to the Moon
From the fatal Apollo 1 fire to Apollo 8's daring lunar orbit to Apollo 11's successful landing—revisiting the disasters, fears, and compromises of the Apollo program and their lessons for today's return to the Moon.

Netflix Trust Exercise Turns Into Firing Trap: Where Are the Boundaries of Corporate Trust?
A Netflix employee was fired after sharing private info in a trust exercise. We analyze the risks of corporate trust exercises and how employees can protect themselves.

AMD CDNA5 Architecture Deep Dive: Technical Evolution and the AI Computing Competition Landscape
Deep analysis of AMD's CDNA5 architecture covering Chiplet packaging upgrades, HBM memory evolution, and low-precision compute optimization, examining how AMD challenges NVIDIA's AI chip dominance.