NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Logical Distillation of Transformer Encoders

Matteo Forasassi, Thomas Gärtner, Thomas Lukasiewicz, Sagar Malhotra

NeurIPS page · OpenReview · Open on the map

Category: Interpretability & Model Adaptation › Predictive State Estimation in Context · Type: new method · Keywords: transformer interpretability, logical distillation, iterated temporal decision trees, linear temporal logic, protein sequence analysis

Areas: Model Architectures & Sequence Modeling › Language Model Architectures › Algorithmic Transformers; Interpretability › Mechanistic Interpretability › Mechanistic Interpretability

Summary

The paper introduces iterated temporal decision trees (ITDTs) to distill transformer encoders into interpretable logical formulas, enabling compositional explanations of transformer behavior.

Explained to a 5-year-old

We have a smart computer brain that reads lots of information. It works like a big puzzle, but we can't see how it makes decisions. Scientists want to make this brain easy to understand, like a simple story. They created a new way to turn the brain’s ideas into clear, step-by-step rules. These rules help us see what the brain learned and use it safely.

Explained to a 5-year-old, longer

A transformer is a kind of computer program that can read and understand many words or pictures. It does this by finding patterns in the data, but we often cannot see what those patterns are. Knowing exactly how it works is important because we want to trust the answers it gives. The researchers wanted to make a “surrogate” - a simpler model - that could explain the transformer’s decisions. They looked at how transformers can represent logical statements over time. Using this idea, they built a structure made of many simple decision trees. Each tree asks a question about the data and splits it into smaller groups. The trees are linked together so that later trees can use the answers from earlier ones. This creates a series of logical rules that describe how information flows through the original model. When they applied this to problems that involve time, like planning or biology, it worked well. It also helped them discover useful patterns in protein sequences, which are like tiny recipes for building proteins. The result is a set of easy-to-read rules that let scientists understand and trust the transformer’s outputs.

For a technical reader

The work shows how to turn a complex transformer model into a series of simple decision trees that together form logical formulas. By exploiting known links between transformer expressivity and linear temporal logic, the trees capture temporal composition in a human-readable way. The resulting surrogate can be evaluated on standard LTL benchmarks and applied to protein sequence data, yielding clear rules without retraining the original model. This makes transformer behavior transparent and usable in safety-critical or scientific settings.

Problem

There is a need for interpretable surrogates for transformer models, but existing methods that extract sparse latent features fail to capture how information is composed across a sequence.

Method

The approach builds on theoretical connections between transformer expressivity and linear temporal logic, constructing a sequence of decision trees that progressively capture temporal composition, and then distills the transformer into this structure.

Results

The approach recovers succinct and accurate formulas on LTL benchmarks and extracts interpretable rules for protein sequence datasets.

Contributions

The paper provides a method to distill transformer encoders into logical formulas using a sequence of decision trees that capture temporal composition, enabling interpretable surrogates for transformers.

Practical relevance

Providing interpretable logical surrogates improves safety and enables scientific discovery using transformer models.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction