Circuits, Features, and Heuristics in Molecular Transformers

Kristof Varadi, Mark Marosi, Peter Antal
12/10/2025
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Transformers generate valid and diverse chemical structures, but little is known about the mechanisms that enable these models to capture the rules of molecular representation. We present a mechanistic analysis of autoregressive transformers trained on drug-like small molecules to reveal the computational structure underlying their capabilities across multiple levels of abstraction. We identify computational patterns consistent with low-level syntactic parsing and more abstract chemical validity constraints. Using sparse autoencoders (SAEs), we extract feature dictionaries associated with chemically relevant activation patterns. We validate our findings on downstream tasks and find that mechanistic insights can translate to predictive performance in various practical settings.

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. Any repos shown below are weak matches — 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{varadi2025circuits,
  title  = {Circuits, Features, and Heuristics in Molecular Transformers},
  author = {Kristof Varadi and Mark Marosi and Peter Antal},
  year   = {2025},
  eprint = {2512.09757},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.09757v1}
}

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

Discussion