Skip to main content

GRAPH TRANSFORMERS DREAM OF ELECTRIC FLOW

Publication ,  Conference
Cheng, X; Carin, L; Sra, S
Published in: 13th International Conference on Learning Representations Iclr 2025
January 1, 2025

We show theoretically and empirically that the linear Transformer, when applied to graph data, can implement algorithms that solve canonical problems such as electric flow and eigenvector decomposition. The Transformer has access to information on the input graph only via the graph's incidence matrix. We present explicit weight configurations for implementing each algorithm, and we bound the constructed Transformers' errors by the errors of the underlying algorithms. Our theoretical findings are corroborated by experiments on synthetic data. Additionally, on a real-world molecular regression task, we observe that the linear Transformer is capable of learning a more effective positional encoding than the default one based on Laplacian eigenvectors. Our work is an initial step towards elucidating the inner-workings of the Transformer for graph data. Code is available at https://github.com/chengxiang/LinearGraphTransformer.

Duke Scholars

Published In

13th International Conference on Learning Representations Iclr 2025

Publication Date

January 1, 2025

Start / End Page

75663 / 75684
 

Citation

APA
Chicago
ICMJE
MLA
NLM
Cheng, X., Carin, L., & Sra, S. (2025). GRAPH TRANSFORMERS DREAM OF ELECTRIC FLOW. In 13th International Conference on Learning Representations Iclr 2025 (pp. 75663–75684).
Cheng, X., L. Carin, and S. Sra. “GRAPH TRANSFORMERS DREAM OF ELECTRIC FLOW.” In 13th International Conference on Learning Representations Iclr 2025, 75663–84, 2025.
Cheng X, Carin L, Sra S. GRAPH TRANSFORMERS DREAM OF ELECTRIC FLOW. In: 13th International Conference on Learning Representations Iclr 2025. 2025. p. 75663–84.
Cheng, X., et al. “GRAPH TRANSFORMERS DREAM OF ELECTRIC FLOW.” 13th International Conference on Learning Representations Iclr 2025, 2025, pp. 75663–84.
Cheng X, Carin L, Sra S. GRAPH TRANSFORMERS DREAM OF ELECTRIC FLOW. 13th International Conference on Learning Representations Iclr 2025. 2025. p. 75663–75684.

Published In

13th International Conference on Learning Representations Iclr 2025

Publication Date

January 1, 2025

Start / End Page

75663 / 75684