Executing Causal Structure Learning with Linear-Attention Transformers

Amartya Roy, Sayar Karmakar
10/7/2026
cs.LG
transformer-attention

No confident code implementation found for this paper.

Abstract

Transformers can execute algorithms on data given in their input. We ask whether they can do the same for causal discovery.

Show full abstract

We study a standard continuous method that repeatedly updates a candidate causal graph while enforcing acyclicity. We explicitly construct a fixed-weight transformer whose forward pass exactly reproduces one update of this method, so repeated blocks reproduce its optimization trajectory. The transformer carries the current graph and the algorithm's multiplier between updates. We show that retaining the multiplier is essential for exact execution, since different multiplier values can lead to different next updates. We also give conditions under which, within a fixed stage, the number of updates needed to reach a target accuracy can be computed in advance and rounding errors stay bounded as depth grows. Experiments show that the constructed block agrees with a reference update to floating-point precision, while arithmetic replay on synthetic data and seven published benchmark network topologies inherits the reference solver's successes and failures. This separates accurate algorithm execution from accurate causal recovery. In contrast, the ordinary attention models tested under our training budgets do not reliably execute the update or transfer to larger graphs. Whether gradient training can learn an executor in the architecture class of the construction remains open.

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{roy2026executing,
  title  = {Executing Causal Structure Learning with Linear-Attention Transformers},
  author = {Amartya Roy and Sayar Karmakar},
  year   = {2026},
  eprint = {2610.10395},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.10395v1}
}

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

Discussion