Neural Topological Ordering for Computation Graphs
Mukul Gagrani, Corrado Rainone, Yang Yang, Harris Teague, Wonseok Jeon, Roberto Bondesan, Herke van Hoof, Christopher Lott, Weiliang Will Zeng, Piero Zappi
Abstract
Recent works on machine learning for combinatorial optimization have shown that learning based approaches can outperform heuristic methods in terms of speed and performance. In this paper, we consider the problem of finding an optimal topological order on a directed acyclic graph with focus on the memory minimization problem which arises in compilers. We propose an end-to-end machine learning based approach for topological ordering using an encoder-decoder framework. Our encoder is a novel attention based graph neural network architecture called Topoformer which uses different topological transforms of a DAG for message passing. The node embeddings produced by the encoder are converted into node priorities which are used by the decoder to generate a probability distribution over topological orders. We train our model on a dataset of synthetically generated graphs called layered graphs. We show that our model outperforms, or is on-par, with several topological ordering baselines while being significantly faster on synthetic graphs with up to 2k nodes. We also train and test our model on a set of real-world computation graphs, showing performance improvements.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 87d8e99a-3a87-4e0a-982d-3ce88413b3b8Cited by top-tier papers10
- Transformers over Directed Acyclic GraphsYuankai Luo, Veronika Thost, Lei ShiNeurIPS 2023 · 43 citations
- Learning to Scale Logits for Temperature-Conditional GFlowNetsMinsu Kim, Joohwan Ko, Taeyoung Yun, Dinghuai Zhang et al.ICML 2024 · 31 citations
- A Theory of Non-acyclic Generative Flow NetworksLeo Maxime Brunswic, Yinchuan Li, Yushun Xu, Yijun Feng et al.AAAI 2024 · 9 citations
- Differentiable Combinatorial Scheduling at ScaleMingju Liu, Yingjie Li, Jiaqi Yin, Zhiru Zhang et al.ICML 2024 · 7 citations
- Moccasin: Efficient Tensor Rematerialization for Neural NetworksBurak Bartan, Haoming Li, Harris Teague, Christopher Lott et al.ICML 2023 · 3 citations
Builds on8
- Do Transformers Really Perform Badly for Graph Representation?Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng et al.NeurIPS 2021 · 1,632 citations
- On Layer Normalization in the Transformer ArchitectureRuibin Xiong, Yunchang Yang, Di He, Kai Zheng et al.ICML 2020 · 1,388 citations
- NeuroLKH: Combining Deep Learning Model with Lin-Kernighan-Helsgaun Heuristic for Solving the Traveling Salesman ProblemLiang Xin, Wen Song, Zhiguang Cao, Jie ZhangNeurIPS 2021 · 202 citations
- Directed Acyclic Graph Neural NetworksVeronika Thost, Jie ChenICLR 2021 · 134 citations
- Reinforced Genetic Algorithm Learning for Optimizing Computation GraphsAditya Paliwal, Felix Gimeno, Vinod Nair, Yujia Li et al.ICLR 2020 · 70 citations
Related papers
- Transferable Graph Optimizers for ML CompilersYanqi Zhou, Sudip Roy, AmirAli Abdolrashidi, Daniel Wong et al.NeurIPS 2020 · 63 citations
- TopoFormer: Topology Meets Attention for Graph LearningMd Joshem Uddin, Astrit Tola, Cuneyt Gurcan Akcora, Baris CoskunuzerICLR 2026 · 2 citations
- Directed Graph Grammars for Sequence-based LearningMichael Sun, Orion Foo, Gang Liu, Wojciech Matusik et al.ICML 2025
- FlowerFormer: Empowering Neural Architecture Encoding Using a Flow-Aware Graph TransformerDongyeong Hwang, Hyunju Kim, Sunwoo Kim, Kijung ShinCVPR 2024
- PACE: A Parallelizable Computation Encoder for Directed Acyclic GraphsZehao Dong, Muhan Zhang, Fuhai Li, Yixin ChenICML 2022 · 24 citations
