Skill Path: Unveiling Language Skills from Circuit Graphs

Hang Chen, Jiaying Zhu, Xinyu Yang, Wenya Wang
10/2/2024
cs.CLcs.AI

No official code found. Best implementation: Zodiark-ch/Language-Skill-of-LLMs (7 stars, MIT, last commit 2024-10-05).

Abstract

Circuit graph discovery has emerged as a fundamental approach to elucidating the skill mechanistic of language models. Despite the output faithfulness of circuit graphs, they suffer from atomic ablation, which causes the loss of causal dependencies between connected components. In addition, their discovery process, designed to preserve output faithfulness, inadvertently captures extraneous effects other than an isolated target skill. To alleviate these challenges, we introduce skill paths, which offers a more refined and compact representation by isolating individual skills within a linear chain of components. To enable skill path extracting from circuit graphs, we propose a three-step framework, consisting of decomposition, pruning, and post-pruning causal mediation. In particular, we offer a complete linear decomposition of the transformer model which leads to a disentangled computation graph. After pruning, we further adopt causal analysis techniques, including counterfactuals and interventions, to extract the final skill paths from the circuit graph. To underscore the significance of skill paths, we investigate three generic language skills-Previous Token Skill, Induction Skill, and In-Context Learning Skill-using our framework. Experiments support two crucial properties of these skills, namely stratification and inclusiveness.

View on arXivView PDF

Code Implementations(1)

MIT
70PythonJun 13, 20242 years agoMIT

Similar Papers

Cite this paper

@article{chen2024skill,
  title  = {Skill Path: Unveiling Language Skills from Circuit Graphs},
  author = {Hang Chen and Jiaying Zhu and Xinyu Yang and Wenya Wang},
  year   = {2024},
  eprint = {2410.01334},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.01334v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.01334.svg)](https://codeofpaper.com/paper/2410.01334)

Discussion