Semantic Regexes: Auto-Interpreting LLM Features with a Structured Language

Angie Boggust, Donghao Ren, Yannick Assogba, Dominik Moritz, Arvind Satyanarayan +1 more
10/7/2025
cs.CL

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{boggust2025semantic,
  title  = {Semantic Regexes: Auto-Interpreting LLM Features with a Structured Language},
  author = {Angie Boggust and Donghao Ren and Yannick Assogba and Dominik Moritz and Arvind Satyanarayan and Fred Hohman},
  year   = {2025},
  eprint = {2510.06378},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.06378v1}
}

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/2510.06378.svg)](https://codeofpaper.com/paper/2510.06378)

Discussion