NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Beyond Incremental Beam Search for Compositional Explanations of Neurons

Biagio La Rosa, Leilani H. GilpinNeurIPS 2026

TL;DR

Deep learning interpretability often tries to translate what an individual neuron does into a human-readable logical formula (like grass AND (green OR yellow)). Until now, finding these formulas relied on a greedy, step-by-step search that routinely trapped itself in suboptimal explanations. By letting the search algorithm insert concepts inside existing clauses, recombine past ideas, and prune redundant "synonyms," the authors unlock richer, vastly more accurate explanations of how neurons fire—without blowing up compute time or confusing human readers.

What Problem Does This Paper Address?

Inside neural networks, neurons are famously "polysemantic"—a single neuron might fire for multiple, seemingly unrelated concepts, or specific combinations of them. Compositional explanations try to map this behavior by finding a propositional logic formula (using AND, OR, AND NOT) over human-interpretable concepts whose presence best overlaps with the neuron's activations—measured by Intersection over Union (IoU).

Because the number of possible formulas explodes combinatorially with vocabulary size, exhaustive search is usually impossible. Prior methods tame this using incremental beam search: start with single concepts, keep the top $b$ candidates, tack one new concept onto the end of each, and repeat.

Here’s the catch: building formulas strictly left-to-right (((A op B) op C)) severely limits expressiveness. Because the newest operator always wraps the entire preceding formula, you can't easily group sub-ideas (like (A OR B) AND (C OR D)). Worse, if a crucial building block looks weak early on, beam search throws it away forever.

Comparison of incremental vs. non-incremental explanations on a contradiction-detecting neuron

Methods

While keeping standard heuristic-guided beam search as a foundation, the authors overhaul how candidates are generated and filtered through two novel mechanisms:

  1. Non-Incremental Beam Expansion: Alongside standard right-hand additions, the algorithm generates two new candidate families:
  2. Internal insertion: Injecting a new concept directly inside an existing compatible sub-clause (turning (A OR B) AND C into (A OR B OR D) AND C).
  3. Pairwise recombination: A lightweight form of backtracking that merges promising formulas from earlier beam levels—for instance, joining disjoint clauses (A OR B) and (C AND D), or factoring shared concepts across overlapping clauses.
  4. Functional-Equivalence-Aware Beam Search: Syntactically different formulas often light up the exact same data samples—meaning they induce identical binary masks. The authors formalize three types of functional equivalence:
  5. Type 1 (Logical): Intrinsically identical, like $A \land B$ vs. $B \land A$.
  6. Type 2 (Dataset Equivalence): Same concepts, different logic, yet identical on the specific dataset due to missing co-occurrences.
  7. Type 3 (Dataset Ambiguity): Different concepts that happen to co-occur identically on the dataset.

During search, Type 1 and 2 duplicates are discarded so they don't hog beam slots, preserving diversity. Type 3 matches, however, are kept and actively recombined to resolve dataset ambiguities in subsequent steps.

Datasets

No new benchmarks are introduced; the authors follow standard interpretability setups to evaluate six pre-trained/finetuned models:

  • Vision: ResNet18, AlexNet, and DenseNet161 (trained on Places365), probed using the Broden dataset, which provides pixel-level segmentation masks for visual concepts (colors, textures, objects).
  • Natural Language Inference (NLI): BiLSTM, BERT, and TinyLLaMA 1.1B, probed using the SNLI corpus (concepts include the top 2,000 words, POS tags, premise/hypothesis overlap, and word2vec neighbors).

Key Insights and Ideas

  • Language needs nested logic: In NLI, neurons often detect contradictions between premise and hypothesis—requiring matching one set of synonyms against another (e.g., sitting/sits/sit vs. standing/running). Left-to-right incremental formulas simply cannot express (A OR B) AND (C OR D) cleanly, explaining why non-incremental search shines so brightly on text.
  • Redundancy is the silent killer of beam search: Expanding the search space generates many equivalent formulas. Explicitly deduplicating Type 1 and Type 2 equivalences prevents a single semantic idea from cloning itself across the entire beam.
  • Richer structure doesn't hurt readability: One might worry that nested parentheses make explanations harder for humans to parse. In practice, grouping related concepts into clean sub-clauses feels more natural than awkward chains of incremental negations.
Visualizing unit 91 of AlexNet where non-incremental search finds the optimal formula

Key Results

  • NLP Tasks: Across BiLSTM, BERT, and TinyLLaMA, the non-incremental method discovers strictly higher-IoU explanations for 57% to 67% of neurons, whereas incremental search wins less than 5% of the time (the rest tie). Runtime stays within the same order of magnitude (~50s vs. ~28s per unit).
  • Vision & Optimality: With formula length capped at 3, exact ground-truth optimal solutions can be computed (>1 hour/unit). Standard beam search misses optimality up to 24% of the time; the new approach boosts optimal recovery from 78% to 92% on AlexNet and 76% to 90% on DenseNet161 in ~2 minutes per unit.
  • Human Evaluation: Across 65 participants (390 judgments), non-incremental formulas were statistically preferred for descriptive power (42.8% vs. 32.3%, $p = .018$) with no loss in understandability (non-inferiority $p < .001$).

Limitations and Future Work

  • Heuristic Sensitivity: Search speed depends heavily on a tight, admissible upper-bound heuristic to prune candidates early; a loose heuristic will bog down runtime.
  • Polynomial Overhead & Outliers: Worst-case candidate generation scales as $O(bpo n^2 + b^2 n^2)$ vs. $O(nbpo)$ for incremental search (where $b$ is beam width, $p$ concepts, $o$ operators, $n$ length). While median runtimes match incremental search, degenerate neurons with many competitive candidates create runtime outliers.
  • Future Directions: Exploring alternative non-incremental search strategies, incorporating richer logical operators (beyond atomic negations), and adding structural constraints to further speed up search and refine explanation quality.

Summary updated

BibTeX
@inproceedings{rosa2026beyond,
  author = {Biagio La Rosa and Leilani H. Gilpin},
  title = {{Beyond Incremental Beam Search for Compositional Explanations of Neurons}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=QYZFm5iY4H},
}
Figure