It’s late, you’ve spent all day looking at code or data, and you’re probably wondering: How do these Large Language Models (LLMs) actually arrive at an answer? We know they predict the next token, but what happens in those dozens of hidden layers between the input and the final word?
Usually, to find out, you’d need a PhD, a massive GPU cluster, and a deep familiarity with Python libraries like TransformerLens. But a new paper from researchers at Northeastern University introduces PatchLens, a tool that turns the "black box" of an LLM into a drag-and-drop playground for the rest of us.
TL;DR
PatchLens is a browser-based interface that lets non-experts peer into the "thoughts" of massive AI models (like Llama-3.1-70B) using techniques called the logit lens and activation patching. Instead of reading complex vectors, users see readable tokens at every layer and can literally drag a "concept" from one prompt and drop it into another to see how it changes the model's output.
What Problem Does This Paper Address?
Most people interact with LLMs through a chat interface that presents a finished reply as a fait accompli. This "seamless" design hides the fact that the model is actually making predictions at every single position, layer by layer.
While researchers use Mechanistic Interpretability (MI) to reverse-engineer these models, their tools are built for other researchers. Existing educational tools for the public usually focus on architecture—showing you the "plumbing" of attention heads and neurons—but they don't let you see the flow of a specific prediction or intervene in it. The authors wanted to bridge this gap, allowing non-experts to move from being passive observers to active "mechanics" of the model's internal state.
Methods
The researchers built PatchLens around two core MI techniques, adapted for a visual, code-free environment:
- Logit Lens: Normally, a model only "decides" on a word at the very last layer. The logit lens forces the model to "commit" early. It takes the hidden state at any intermediate layer and projects it back into the model's vocabulary.
-
Visualized: You see a grid where rows are input tokens and columns are layers. Each cell shows the word the model is "leaning towards" at that specific point in its "thought process."
The logit lens projects intermediate states into readable tokens. -
Activation Patching: This is a causal intervention. If you have two similar prompts (e.g., "The Eiffel Tower is in..." and "The Colosseum is in..."), you can take the internal "activation" (the specific numerical state) from the "Eiffel Tower" run and "patch" it into the "Colosseum" run.
-
The Goal: To see if that specific layer and position are responsible for the model's final answer. If patching the "Eiffel" state into the "Colosseum" prompt makes the model output "Paris" instead of "Rome," you’ve found the "seam" where that factual information is stored.
Activation patching as a causal intervention.
PatchLens runs these interventions on research-scale models (up to Llama-3.1-405B) served remotely via the National Deep Inference Fabric (NDIF), meaning you can do high-level AI research in a standard Chrome tab.
Datasets
The paper focuses on a user study rather than a new model training dataset. They evaluated PatchLens with 61 non-experts (recruited via Prolific) in a between-subjects study, comparing it against the popular Transformer Explainer.
Key Insights and Ideas
- Tokens as the Interface: By rendering hidden states as tokens (words) rather than heatmaps or scalars, the interface speaks the user's language. The tokens you read are the same tokens you manipulate.
-
Direct Manipulation: The "Aha!" moment for many users was the ability to drag a cell from one prompt's grid and drop it onto another. This turns an abstract mathematical operation into a physical gesture.
Fig. 1. PatchLens brings mechanistic interpretability interventions to non-expert users, in the browser, on research-scale open-weight models. Here activation patching tests which layers are causally relevant to the target prompt’s completion, “The Colosseum is in the city of” with Rome. (A) The learner writes a source prompt and a minimally different target prompt. (B) Logit lens renders the residual stream as readable tokens on the lens grid: each row an input token position, each column a layer, each cell the tokens that layer’s intermediate state comes closest to. (C) Clicking a cell opens its ranked readouts; the layer-20 state at Tower ranks France first and Paris third. (D) Dragging that cell onto the target at the same layer performs the patch. (E) The target, which predicted Rome on its own, now predicts Paris. -
Shifting the Difficulty: Interestingly, PatchLens users reported lower mental demand than those using architectural explainers. They located their struggles in the interface (how to navigate the grid) rather than the material (how a transformer works). This suggests that MI techniques might actually be more intuitive for learning than learning the "plumbing" of the model itself.
Key Results
- Agency and Authorship: PatchLens users were far more likely to write their own prompts from scratch (21 out of 32 users) compared to the baseline group (only 1 out of 29). When users can "touch" the internals, they feel more empowered to experiment.
- Mental Demand: PatchLens users reported a median mental demand of 7/10, significantly lower than the 8/10 reported by the Transformer Explainer group.
- Knowledge Gains: The study was inconclusive on whether PatchLens taught "more" factual knowledge about transformers. The authors suggest this is because PatchLens avoids technical jargon (like "weights" or "attention heads") in favor of showing the process, which the standard knowledge tests weren't designed to measure.
Limitations and Future Work
- The "Return Trip": While users learned how the model works internally, it’s unclear if this helps them use everyday tools like ChatGPT more effectively.
- Vocabulary Mismatch: Because PatchLens teaches the mechanism without the jargon, users might struggle to communicate their findings to experts who use standard ML terminology.
- Scaling the Intervention: Currently, PatchLens focuses on patching a single layer/position. Real-world MI research often involves "sweeps" across thousands of combinations, which is harder to visualize for a non-expert.
In the end, PatchLens suggests that the best way to understand AI isn't just to read about it, but to reach inside and start moving the gears yourself.
Summary updated