paper-with-me

Papers

Extracting Rule-based Descriptions of Attention Features in Transformers

2025-10-20 · Dan Friedman, Adithya Bhaskar, Alexander Wettig, Danqi Chen arxiv

Mechanistic interpretability strives to explain model behavior in terms of bottom-up primitives. The leading paradigm is to express hidden states as a sparse linear combination of basis vectors, called features. However, this only identifies which text sequences (exemplars) activate which features; the actual interpretation of features requires subjective inspection of these exemplars. This paper advocates for a different solution: rule-based descriptions that match token patterns in the input and correspondingly increase or decrease the likelihood of specific output tokens. Specifically, we extract rule-based descriptions of SAE features trained on the outputs of attention layers. While prior work treats the attention layers as an opaque box, we describe how it may naturally be expressed in terms of interactions between input and output features, of which we study three types: (1) skip-gram rules of the form "[Canadian city]... speaks --> English", (2) absence rules of the form "[Montreal]... speaks -/-> English," and (3) counting rules that toggle only when the count of a word exceeds a certain value or the count of another word. Absence and counting rules are not readily discovered by inspection of exemplars, where manual and automatic descriptions often identify misleading or incomplete explanations. We then describe a simple approach to extract these types of rules automatically from a transformer, and apply it to GPT-2 small. We find that a majority of features may be described well with around 100 skip-gram rules, though absence rules are abundant even as early as the first layer (in over a fourth of features). We also isolate a few examples of counting rules. This paper lays the groundwork for future research into rule-based descriptions of features by defining them, showing how they may be extracted, and providing a preliminary taxonomy of some of the behaviors they represent.

📄 PDF Abstract BibTeX arXiv:2510.18148

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Centroid Transformers: Learning to Abstract with Attention

2021-02-17 · Lemeng Wu, Xingchao Liu, Qiang Liu

Self-attention, as the key block of transformers, is a powerful mechanism for extracting features from the inputs. In essence, what self-attention does is to infer the pairwise relations between the elements of the input…

Abstractive Text SummarizationClusteringImage ClassificationText Summarization

Classification of Geological Borehole Descriptions Using a Domain Adapted Large Language Model

2024-06-24 · Hossein Ghorbanfekr, Pieter Jan Kerstens, Katrijn Dirix

Geological borehole descriptions contain detailed textual information about the composition of the subsurface. However, their unstructured format presents significant challenges for extracting relevant features into a st…

Language ModelingLanguage ModellingLarge Language Model

Sparse Logistic Regression with High-order Features for Automatic Grammar Rule Extraction from Treebanks

2024-03-26 · Santiago Herrera, Caio Corro, Sylvain Kahane

Descriptive grammars are highly valuable, but writing them is time-consuming and difficult. Furthermore, while linguists typically use corpora to create them, grammar descriptions often lack quantitative data. As for for…

Descriptive

GUIDO: A Hybrid Approach to Guideline Discovery & Ordering from Natural Language Texts

2023-07-19 · Nils Freyer, Dustin Thewes, Matthias Meinecke

Extracting workflow nets from textual descriptions can be used to simplify guidelines or formalize textual descriptions of formal processes like business processes and algorithms. The task of manually extracting processe…

Dependency ParsingModel extractionSentenceSpecificity

From Explicit Rules to Implicit Reasoning in an Interpretable Violence Monitoring System

2024-10-29 · Wen-Dong Jiang, Chih-Yung Chang, Ssu-Chi Kuai, Diptendu Sinha Roy

Recently, research based on pre-trained models has demonstrated outstanding performance in violence surveillance tasks. However, most of them were black-box systems which faced challenges regarding explainability during …

Binary Classification