Attribution-Guided Pruning for Insight and Control: Circuit Discovery and Targeted Correction in Small-scale LLMs
Abstract
Domain fit: AI-core · Core AI workload signals detected from paper context and implementation/artifact evidence.
Large Language Models (LLMs) are widely deployed in real-world applications, yet their internal mechanisms remain difficult to interpret and control, limiting our ability to diagnose and correct undesirable behaviors. Mechanistic interpretability addresses this challenge by identifying circuits -- subsets of model components responsible for specific behaviors. However, discovering such circuits in LLMs remains difficult due to their scale and complexity. We frame circuit discovery as identifying parameters that contribute most to model outputs on task-specific inputs, and use Layer-wise Relevance Propagation (LRP) with reference samples to attribute and extract these components via pruning. Building on this, we introduce contrastive relevance to isolate circuits associated with undesired behaviors while preserving general capabilities, enabling targeted model correction. On OPT-125M, we show that pruning as little as ~0.3% of neurons substantially reduces toxic outputs, while pruning approximately 0.03% of weight elements mitigates repetitive text generation without degrading general performance. These results establish attribution-guided pruning as an effective mechanism for identifying and intervening on behavior-specific circuits in LLMs. We further validate our findings on additional small-scale language models, demonstrating that the proposed approach transfers across architectures. Our code is publicly available at https://github.com/erfanhatefi/SparC3.
Results and benchmarks
Large Language Models (LLMs) are widely deployed in real-world applications, yet their internal mechanisms remain difficult to interpret and control, limiting our ability to diagnose and correct undesirable behaviors.
| Task | Dataset | Metric | Value | Source |
|---|---|---|---|---|
| Natural language processing | Original Scores | Llama2-7B | 48.74 | paper-derived |
| Natural language processing | Magnitude | Llama2-7B | 41.38 | paper-derived |
Audit each benchmark finding before selecting an implementation path. Evidence refs map to the disclosure below.
Evidence graph: 2 refs, 1 links.
Utility signals: depth 95/100, grounding 68/100, status medium.
Implementation
Historical official implementation (not recommended for new builds)
Only a historical official implementation is available
Use with caution for new projects; verify against current tooling and maintained community alternatives.
erfanhatefi/sparc3 · 2 stars · Last push May 8, 2026
Only historical official repository was found (erfanhatefi/sparc3).
Open erfanhatefi/sparc3- Only historical official implementation is available
- No direct maintained implementation is currently verified.
- Only historical official repository was found: erfanhatefi/sparc3.
- No maintained paper-verified implementation met reliability thresholds.
Compare implementation paths
Compare maintenance quality, reproducibility coverage, and evidence confidence before choosing a reproduction baseline.
- Maintenance
- Recently updated
- Confidence
- High
- Reproducibility
- Limited
- Stars
- 2
- Last push
- May 8, 2026 (110d)
Official implementation from Papers with Code · Repository link is mentioned in the paper metadata
- No CI pipeline detected
- No tagged releases
- No Docker setup
- Maintenance
- Stale risk
- Confidence
- Low
- Reproducibility
- Strong
- Stars
- 4
- Last push
- Nov 28, 2025 (272d)
Matched via arXiv identifier search
- No tagged releases
- No Docker setup
- Low confidence match
- Maintenance
- Stale risk
- Confidence
- Low
- Reproducibility
- Limited
- Stars
- 0
- Last push
- Nov 2, 2025 (297d)
Matched via arXiv identifier search
- No CI pipeline detected
- No tagged releases
- No Docker setup
Reproduction readiness
Major work
No dependency manifest, manual reconstruction required
- erfanhatefi/sparc3 has no requirements.txt, environment.yml, pyproject.toml, or Dockerfile.
- You will need to reverse-engineer dependencies from import statements in the source code.
Hardware requirements
- Expect multi-day setup/compute for meaningful reproduction based on current guidance.
Repositories and ecosystem
No additional verified repositories beyond the primary recommendation.
These repositories had low-confidence matching signals and are hidden by default.
- linxid/ai-paper-daily
Confidence: Low · 4 stars
- KadenZheng/2881r-toxic-proj
Confidence: Low · 0 stars
Hugging Face artifacts
No trustworthy direct or curated related Hugging Face artifacts were found yet. Use targeted searches to quickly locate candidate models, datasets, and demos.
Tip: start with models, then check datasets and spaces if you need evaluation data or demos.
Research context
Tasks
Natural language processing
Methods
Transformer
Domains
Natural Language Processing
Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.
Open in HFEPXJump to Paper2Code search queries derived from this paper's research context.
Data includes links from Papers with Code ( CC-BY-SA-4.0 ).