[Proposal] Linear Artificial Tomography (LAT) scans
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- python
- Domain
- machine-learning
Research direction
The proposal adds a LAT utility for HookedTransformer using run_with_cache and resid_pre/resid_post projections. No specific files or tests are named; review the TransformerLens package and HookedTransformer hooks to find integration points. Done means a merged PR implementing the sketched API with direction extraction, scans, baselines, and visualization.
Written by the indexing model from the issue text.
Description
Summary
Add a utility for running LAT scans on HookedTransformer models. A scan finds a concept direction at each layer and projects activations onto it, producing a layer-by-token readout of where the concept is represented. TransformerLens has the hooks for this, but no standard implementation.
Motivation
LAT is a common tool in representation engineering, and each project currently reimplements it. I used it to study emotion-associated directions in Qwen3-0.6B, where alignment rose in later layers. Interpreting that result required controls for norm growth and anisotropy that a shared implementation could provide by default. I already have the code written, would have to just be ported to the repository.
Proposed functionality
Direction extraction: Build per-layer concept vectors from contrastive or stimulus-based prompt sets, with PCA or difference-of-means options.
Scanning: Run run_with_cache over input text and project resid_pre / resid_post onto the vectors, returning a layer × token score tensor.
Baselines: Built-in random-direction and norm-matched controls, plus optional centering or whitening from neutral-prompt statistics.
Visualization: Layer-wise alignment curves and token-level heatmaps.
Interventions: Optional steering or ablation along extracted vectors for causal checks.
Example usage
python
scan = lat_scan(model, concept_prompts, neutral_prompts, layers="all")
scores = scan.project(text)
scan.plot(baseline="random")
The API is only a sketch, and I’m open to whatever fits the library’s conventions.
Example of the image generated:
- Dominant language
- Python
- Stars
- 3.9k
- Forks
- 708
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 82
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TransformerLensOrg/TransformerLens
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TransformerLensOrg/TransformerLens#1980 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TransformerLensOrg/TransformerLens#1979 ·
Maintainers usually reply within 1 day
-
[Proposal] Demo: auditing a published LLM-written weight edit (Weight-Space Programming, Qwen3.5-0.8B loop fix) with TransformerBridgePossibly taken @emerardd claimed this today. Opencomplexity-moderate demo TransformerBridge
TransformerLensOrg/TransformerLens#1978 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
[Bug Report] `blocks.N.hook_out` never fires on OpenAI GPT because the HF block returns a listPossibly taken @ska2704 claimed this 2 days ago. Openbug complexity-simple TransformerBridge
Difficulty 3/5 Half a day Newbie friendliness 72/100
TransformerLensOrg/TransformerLens#1969 · 2 comments ·
Maintainers usually reply within 1 day
-
[Proposal] KV-group destinations for direct path patching on GQA/MQA modelsPossibly taken @emerardd claimed this 6 days ago. Opencomplexity-moderate enhancement TransformerBridge
TransformerLensOrg/TransformerLens#1954 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in TransformerLensOrg/TransformerLens
Similar issues
-
curriculum documentation quality
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
githubnext/gh-aw-workshop#5367 ·
Maintainers usually reply within 3 days
-
Create Noise Latents ignores randomize_seed and produces the same noise every runPossibly taken @griptapeops claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
griptape-ai/griptape-nodes-library-diffusers#127 ·
Maintainers usually reply within 1 day
-
Jenkins capacity report: metrics history is lost when archiving a month failsPossibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
adoptium/infrastructure#4568 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
huggingface/deep-rl-class#723 ·
-
premises-missing
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
WingedGuardian/GENesis-AGI#3928 ·
Maintainers usually reply within 1 day