Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Flock: A Knowledge Graph Foundation Model via Learning on Random Walks

About

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.

Jinwoo Kim, Xingyue Huang, Krzysztof Olejniczak, Kyungbin Min, Michael Bronstein, Seunghoon Hong, \.Ismail \.Ilkan Ceylan• 2025

Related benchmarks

TaskDatasetResultRank
Entity Prediction54 KGs Inductive e, r (23 graphs)
MRR41.7
6
Entity Prediction54 KGs 18 graphs (Inductive e)
MRR0.473
6
Entity Prediction54 KGs Total Average
MRR42.7
6
Relation Prediction54 KGs Inductive e, r
MRR92.9
6
Relation Prediction54 KGs Inductive e
MRR0.887
6
Relation Prediction54 KGs Transductive
MRR89.7
6
Relation Prediction54 KGs Total Avg
MRR90.7
6
Entity Prediction54 KGs 13 graphs (Transductive)
MRR0.383
6
Relation PredictionPretrained KGs 3 graphs
MRR0.977
3
Entity Prediction3 KGs (Pretrained)
MRR0.415
3
Showing 10 of 10 rows

Other info

Follow for update