acceptodds
Under review as a conference paper at ICLR 2027

Compile Locally, Query Globally: Learning Reusable Graph Programs

Abstract

When familiar graph components are connected in new ways, reusing local structural knowledge can support new predictions and avoid repeated computation. However, standard message-passing representations depend on current connections, while boundary-only summaries omit information needed to query internal nodes. We address these challenges by learning how information propagates within each component and reusing this computation across different assemblies. We introduce the Compositional Graph Compiler (CoGraC), an end-to-end framework that turns local structure into reusable numerical programs. Its queryable programs preserve both boundary interactions and recoverable internal responses, allowing them to be connected and jointly executed for prediction. Prediction gradients through this computation train the compiler to retain local computations that remain useful after composition. Once compiled, unchanged components can support new connections and queries without rerunning the encoder. Experiments show that CoGraC improves compositional link prediction and transfers across domains with a frozen compiler. With task-specific training, the same interface supports competitive node classification and improved graph classification, while program reuse reduces computation as real graphs change.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.