Lucid: Visualizing LLM Internal Representations via the Jacobian Lens
Lucid is a web-based instrument developed by Earthpilot Laboratory that enables users to observe the internal conceptual representations of a language model in real-time as it processes a prompt. By utilizing the Jacobian lens, Lucid reveals the concepts a model holds across different layers before it produces a final output, allowing users to see which concepts are activated and which are suppressed.
Visualizing the "Global Workspace" of LLMs
Lucid treats the internal state of the model as a space between input and answer. It focuses on the "J-space," a term used by Anthropic to describe a privileged set of internal representations that a model can report, redirect, and reason with. This is analogous to the global workspace theory in cognitive science, where a certain set of information is made available for conscious access.
The tool allows users to enter a prompt and monitor which concepts enter this workspace at specific layers. This visualization makes it possible to identify concepts the model is considering but ultimately decides not to include in its final response.
Technical Implementation: The Jacobian Lens vs. Logit Lens
Lucid operates by reading the internal representations of a model during a single forward pass. The lens is fit once per model, and the tool supports small open models including Qwen (0.5B to 3B) and Pythia (1.4B).
Technical discussion among users highlights the distinction between the Jacobian lens and the logit lens:
- Logit Lens: Assumes that the residual stream remains in the same basis across layers, effectively projecting the internal state directly to the final vocabulary.
- Jacobian Lens: Corrects for the shift in basis from the initial to the final layer. This makes it more effective on certain architectures where the residual stream changes its representation basis as it moves through the model.
User Experience and Accessibility
Lucid is designed as an open "reading room" with no account or installation required. Key features include:
- Concept Tracking: Users can see the top concepts per layer and position, with rank tracking for pinned tokens.
- Shareable Sessions: Every session can be exported as a shareable slice page.
- Interactive Exploration: The tool provides a guide (the "Docent") to help users understand the terms and how to read the instrument.
Related Research from Earthpilot Laboratory
In addition to Lucid, Earthpilot Laboratory has developed Personality Bench, a tool that runs frontier models through personality tests to analyze their behavioral characteristics (available at persona.earthpilot.ai).
"I love the focus on the pre-answer thinking phase. It feels way more practical than just trying to steer the output with a generic system prompt."
This sentiment reflects the shift toward interpretability tools that target the internal processing phase rather than just the output steering common in prompt engineering.
Sources
Related
- Project
- Project
- Dispatch
- Dispatch
- Dispatch