Semantic Regexes: Auto-Interpreting LLM Features with a Structured Language
This work addresses the challenge of improving interpretability for researchers and practitioners in AI by offering a more precise and scalable method for describing LLM features, though it is incremental in building on existing automated interpretability approaches.
The paper tackled the problem of vague and inconsistent natural language descriptions in automated interpretability of LLM features by introducing semantic regexes, a structured language that matches the accuracy of natural language while providing more concise and consistent descriptions, as validated across benchmarks and user studies.
Automated interpretability aims to translate large language model (LLM) features into human understandable descriptions. However, these natural language feature descriptions are often vague, inconsistent, and require manual relabeling. In response, we introduce semantic regexes, structured language descriptions of LLM features. By combining primitives that capture linguistic and semantic feature patterns with modifiers for contextualization, composition, and quantification, semantic regexes produce precise and expressive feature descriptions. Across quantitative benchmarks and qualitative analyses, we find that semantic regexes match the accuracy of natural language while yielding more concise and consistent feature descriptions. Moreover, their inherent structure affords new types of analyses, including quantifying feature complexity across layers, scaling automated interpretability from insights into individual features to model-wide patterns. Finally, in user studies, we find that semantic regex descriptions help people build accurate mental models of LLM feature activations.