TL;DR
Meta researchers introduce GraphBFF (Graph Billion-Foundation-Fusion), an end-to-end framework and Transformer architecture for training billion-parameter Graph Foundation Models (GFMs) on billion-scale heterogeneous graphs. By establishing neural scaling laws for graphs and outperforming specialized baselines by up to 31 PRAUC points across 10 diverse industrial tasks, this work demonstrates that the foundation model paradigm can successfully generalize to massive, real-world graph data.
What Problem Does This Paper Address?
While foundation models have revolutionized natural language processing (LLMs) and computer vision (ViTs) through large-scale pre-training, extending this success to graphs has proven fundamentally challenging. Real-world graphs are highly heterogeneous, varying drastically across domains in their topological structures, node/edge feature distributions, and scales. Furthermore, graph learning problems span multiple levels of granularity (nodes, edges, and full graphs), and the scarcity of massive, high-quality public datasets has limited the ability to rigorously study how graph models scale.
The authors tackle these hurdles by providing a concrete, reproducible blueprint for building and training practical, billion-parameter Graph Foundation Models capable of learning transferable representations from industrial-scale data.
Methods
The authors present GraphBFF, an end-to-end recipe consisting of a novel architecture and specialized training strategies designed to handle massive scale and severe data imbalance:
- GraphBFF Transformer: Instead of standard all-pairs self-attention, each layer features a heterogeneous attention block combining two distinct mechanisms:
- Type-Conditioned Attention (TCA): Applies type-specific attention transformations but introduces a sparse softmax independently over each neighbor-type subset. This eliminates the memory and I/O bottlenecks typically caused by materializing massive attention matrices for high-degree nodes.
- Type-Agnostic Attention (TAA): Uses shared attention matrices across all node and edge types alongside a fixed-degree neighbor sampling strategy. This enables efficient cross-type attention and mitigates structural overfitting.
- Pre-training Objective: The model is pre-trained using a simple masked link prediction task, demonstrating that sheer scale can compensate for complex, hand-engineered structural inductive biases.
- Advanced Batching: To stabilize training on highly type-skewed graphs, the authors introduce KL-Batching (a storage-level clustering technique that ensures mini-batches match the global type distribution) and Round-Robin Batching (a GPU-level scheduling method that cycles through edge types to prevent gradients from being dominated by common relations).
Datasets
- Enterprise Graph: A massive, real-world internal Meta dataset containing roughly 50 billion nodes and edges, featuring 12 node types and 20 relation types spanning financial, social, business, and infrastructure domains.
- Pre-training Data: 1 billion edges sampled from the Enterprise graph were used for self-supervised pre-training.
- Downstream Tasks: The model was evaluated on 10 diverse industrial downstream tasks (Task 1 to Task 10) covering node- and link-level classification and regression. Crucially, the graphs for these tasks were entirely unseen during pre-training and were out-of-distribution.
Key Insights and Ideas
- Existing FMs are Just Restricted GFMs: The authors note that LLMs (operating on directed path graphs) and ViTs (operating on 2D grid graphs) can be interpreted as specialized graph foundation models embedded with rigid structural inductive biases. GraphBFF removes these constraints to handle arbitrary, general topologies.
- Neural Scaling Laws Apply to Graphs: Just like LLMs, GFMs follow predictable power-law scaling. Performance improves smoothly as a function of model parameters ($N$) and training data size ($D$), provided they are scaled together. Scaling one while keeping the other fixed hits a sharp bottleneck, meaning data and model capacity must grow in tandem.
- The Power of Dual Attention: The authors prove theoretically (Theorem 4.1) and show empirically that combining TCA and TAA is strictly more expressive than using either alone. TCA handles type-specific nuances, while TAA captures broader cross-type structural patterns.
Key Results
- Baselines Crushed: A simple linear or shallow neural network probe evaluated on top of the frozen GraphBFF embeddings consistently outperformed strong, task-specific baselines (including HGT, HAN, and GraphGPS) on all 10 downstream tasks.
- Massive Performance Gains: GFM probing achieved improvements of up to 31 PRAUC points over baselines (e.g., on Task 9, GFM probing achieved 95.19 PRAUC vs. 63.66 for the best baseline).
- Few-Shot & Zero-Shot Superiority: In low-data regimes, GraphBFF shines. A 10-shot GFM probe on Task 9 outperformed baseline models trained on the entire dataset. In zero-shot link prediction, GraphBFF outperformed full-dataset GNN baselines by an absolute margin of 10.08 points on Task 10.
Limitations and Future Work
- Dataset Specificity: The neural scaling laws were derived entirely from Meta's Enterprise dataset; it remains an open question whether these exact scaling exponents transfer to graphs with fundamentally different structures, such as molecular or biological networks.
- Compute-Optimal Allocation: Unlike language models where compute cost per token is constant, graph compute costs depend heavily on neighborhood sizes and sampling distributions, making universal compute-optimal prescriptions difficult to define.
- Objective Functions: The framework relies solely on masked link prediction; exploring alternative or complementary self-supervised objectives is an open direction.
- Small Connected Components: Datasets composed of millions of tiny, disconnected graphs (like molecular datasets) were explicitly out of scope for this framework.
Summary updated