Flock: A Knowledge Graph Foundation Model via Learning on Random Walks
Jinwoo Kim, Xingyue Huang, Krzysztof Olejniczak, Kyungbin Min, Michael M. Bronstein, Seunghoon Hong, Ismail Ilkan Ceylan
Abstract
We study the problem of zero-shot link prediction on knowledge graphs (KGs), which requires models to generalize to novel entities and novel relations. Knowledge graph foundation models (KGFMs) address this task by enforcing equivariance over both nodes and relations, which enables them to learn structural properties of nodes and relations that transfer to novel KGs with similar structure. However, the conventional notion of deterministic equivariance inherently limits the expressive power of KGFMs, as it prevents them from distinguishing relations that are structurally similar but semantically distinct. To overcome this limitation, we propose to leverage probabilistic node-relation equivariance, which preserves equivariance in distribution while using structured randomness to break symmetries at inference time. Building on this principle, we present Flock, a KGFM that iteratively samples random walks, encodes them into sequences, embeds them with a sequence model, and aggregates node and relation representations through learned pooling. Flock respects probabilistic node-relation equivariance and, crucially, is a universal approximator for isomorphism-invariant link-level functions over KGs. Empirically, Flock perfectly solves our new diagnostic dataset Petals on which current KGFMs fail, and achieves state-of-the-art performance on entity and relation prediction tasks across 54 KGs from diverse domains. Code is available at https://github.com/jw9730/flock.
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 3d8fdd6d-b4e1-4d67-8943-f8aa5c06aa03Builds on33
- Object-Centric Learning with Slot AttentionFrancesco Locatello, Dirk Weissenborn, Thomas Unterthiner, Aravindh Mahendran et al.NeurIPS 2020 · 1,275 citations
- Composition-based Multi-Relational Graph Convolutional NetworksShikhar Vashishth, Soumya Sanyal, Vikram Nitin, Partha P. TalukdarICLR 2020 · 1,105 citations
- Neural Bellman-Ford Networks: A General Graph Neural Network Framework for Link PredictionZhaocheng Zhu, Zuobai Zhang, Louis-Pascal A. C. Xhonneux, Jian TangNeurIPS 2021 · 546 citations
- Inductive Relation Prediction by Subgraph ReasoningKomal K. Teru, Etienne G. Denis, William L. HamiltonICML 2020 · 493 citations
- Labeling Trick: A Theory of Using Graph Neural Networks for Multi-Node Representation LearningMuhan Zhang, Pan Li, Yinglong Xia, Kai Wang et al.NeurIPS 2021 · 255 citations
Related papers
- Equivariance Everywhere All At Once: A Recipe for Graph Foundation ModelsBen Finkelshtein, Ismail Ilkan Ceylan, Michael M. Bronstein, Ron LevieNeurIPS 2025 · 21 citations
- Towards Foundation Models for Knowledge Graph ReasoningMikhail Galkin, Xinyu Yuan, Hesham Mostafa, Jian Tang et al.ICLR 2024 · 95 citations
- SEMMA: A Semantic Aware Knowledge Graph Foundation ModelArvindh Arun, Sumit Kumar, Mojtaba Nayyeri, Bo Xiong et al.EMNLP 2025
- How Expressive are Knowledge Graph Foundation Models?Xingyue Huang, Pablo Barceló, Michael M. Bronstein, Ismail Ilkan Ceylan et al.ICML 2025
- Towards Graph Foundation Models: Training on Knowledge Graphs Enables Transferability to General GraphsKai Wang, Siqiang Luo, Caihua Shan, Yifei ShenNeurIPS 2025 · 5 citations
