KGPFN: Unlocking the Potential of Knowledge Graph Foundation Model via In-Context Learning
Yisen Gao, Jiaxin Bai, Haoyu Huang, Zhongwei Xie, Yufei Li, Hong Ting Tsang, Sirui Han, Yangqiu Song
Abstract
Knowledge graph (KG) foundation models aim to generalize across graphs with unseen entities and relations by learning transferable relational structure. However, most existing methods primarily emphasize relation-level universality, while in-context learning, the other pillar of foundation models remains under-explored for KG reasoning. In KGs, context is inherently structured and heterogeneous: effective prediction requires conditioning on the local context around the query entities as well as the global context that summarizes how a relation behaves across many instances. We propose KGPFN, a KG foundation model using Prior-data Fitted Network that unifies transferable relational regularities with inference-time in-context learning from structured context. KGPFN first learns relation representations via message passing on relation graphs to capture cross-graph relational invariances. For query-specific reasoning, it encodes local neighborhoods using a multi-layer NBFNet as local context. To enable ICL at global scale, it constructs relation-specific global context by retrieving a large set of instances of the query relation together with their local neighborhoods, and aggregates them within a Prior-Data Fitted Network framework that combines feature-level and sample-level attention. Through multi-graph pretraining on diverse KGs, KGPFN learns when to instantiate reusable patterns and when to override them using contextual evidence. Experiments on 57 KG benchmarks demonstrate that KGPFN achieves strong adaptation to previously unseen graphs through in-context learning alone, consistently outperforming competitive fine-tuned KG foundation models. Our code is available at https://github.com/HKUST-KnowComp/KGPFN.
AI Impact Assessments
(1 models)Scientific Impact Assessment: KGPFN
1. Core Contribution
KGPFN introduces a knowledge graph foundation model that unifies transferable relational structure learning with inference-time in-context learning (ICL) through the Prior-data Fitted Network (PFN) paradigm. The key insight is that context in KGs is inherently structured and decomposes into two complementary types: local context (query-specific neighborhood subgraphs) and global context (relation-level evidence aggregated across many instances). The model combines relation graph message passing (for cross-graph invariances), multi-layer NBFNet (for local context encoding), and a PFN module with feature-level and sample-level attention (for global context aggregation). The central claim is that this enables zero-shot adaptation to unseen graphs through ICL alone, without fine-tuning.
This contribution is meaningful because prior KG foundation models (ULTRA, TRIX, MOTIF) focused primarily on learning universal relational patterns but neglected the ICL pillar that has been transformative in other foundation model paradigms. KG-ICL explored ICL but in a limited prompt-based fashion with small-shot settings. KGPFN scales ICL to larger context sets and provides a principled Bayesian framing through PFNs.
2. Methodological Rigor
Architecture design is well-motivated. The decomposition into local and global context is intuitive and grounded in concrete examples (the nationality inference case). The use of head-centric subgraphs (rather than enclosing subgraphs) for computational efficiency is a pragmatic and justified design choice.
Theoretical analysis (Theorem 1 and Lemma 2) provides insight into how the model achieves "functional expressivity" beyond mere "structural expressivity." The proof shows that under linear attention and orthogonal motif basis assumptions, the PFN scoring function becomes a weighted alignment between query motif counts and empirical motif statistics from the support set. While the assumptions (linear attention, orthogonal basis, W_Q^T W_K = I) are quite strong and unlikely to hold exactly in practice, the theorem offers useful intuition about the mechanism.
Experimental setup is comprehensive: 57 KG benchmarks across three settings (transductive, inductive, fully inductive), following established protocols. The comparison against four strong baselines (ULTRA, KG-ICL, TRIX, MOTIF) in both zero-shot and fine-tuned configurations is thorough. However, several concerns arise:
3. Potential Impact
The work addresses a genuine gap in KG foundation models by bringing ICL capabilities, which could have broad implications:
However, the practical scalability remains unclear. Constructing global context requires retrieving 20+ positive and 60+ negative instances per query relation, each with their k-hop neighborhoods, which could be expensive for very large KGs. The paper acknowledges limited exploration of scaling laws due to compute constraints.
4. Timeliness & Relevance
The paper is highly timely. KG foundation models are an active area (ULTRA appeared in 2023, TRIX and MOTIF in 2025), and the PFN paradigm for structured data is gaining momentum (TabPFN, TabICL, Limix). KGPFN sits at the intersection of these two trends. The emphasis on ICL for structured data aligns with the broader AI trend toward inference-time adaptation, making the paper relevant beyond the KG community.
5. Strengths & Limitations
Strengths:
Limitations:
Overall Assessment
KGPFN makes a solid contribution by bridging PFN-style in-context learning with KG foundation models. The local/global context decomposition is well-motivated, and the empirical results are strong. The main concerns are around incomplete ablations, the reliance on pretrained TabICL components, and scalability. The work advances the state of the art in KG reasoning and opens a promising research direction at the intersection of structured data foundation models and graph reasoning.
Generated May 15, 2026
Comparison History (28)
Paper 2 presents a more technically rigorous and complete contribution with extensive empirical validation across 57 benchmarks, introducing a novel architecture (KGPFN) that advances knowledge graph foundation models through structured in-context learning. It addresses a well-defined gap in the field with reproducible results and open-source code. Paper 1, while addressing an important clinical AI problem, is described as an initial proof-of-concept without extensive empirical validation, limiting its immediate scientific impact despite its promising framework for uncertainty-aware medical AI.
KGPFN addresses a more fundamental problem—building foundation models for knowledge graphs with in-context learning—which has broader implications across AI. It demonstrates results on 57 benchmarks, showing strong generalization without fine-tuning, a significant advance for KG reasoning. The novel combination of Prior-data Fitted Networks with structured KG context is highly innovative. While CAST makes solid contributions to LLM tool use calibration, it represents more incremental improvements on a narrower problem. KGPFN's approach to transferable relational learning has wider applicability across NLP, databases, and AI systems.
KGPFN addresses a fundamental challenge in knowledge graph foundation models by introducing in-context learning with structured context, demonstrating strong results across 57 benchmarks. Its breadth of impact across KG reasoning, foundation models, and transfer learning is substantial, touching multiple active research areas. Paper 2, while methodologically rigorous and practically useful for agent evaluation in games, addresses a narrower problem (variance reduction in AIVAT estimators) with more limited applicability. Paper 1's novelty in combining Prior-data Fitted Networks with KG reasoning and its broad empirical validation suggest greater potential impact.
Paper 1 addresses a fundamental challenge in knowledge graph foundation models by introducing in-context learning through a novel Prior-data Fitted Network framework, demonstrating strong results across 57 benchmarks. Its breadth of impact across KG reasoning, foundation models, and transfer learning is substantial. Paper 2 makes a solid contribution to explainable MPC with practical applications, but targets a narrower intersection of control theory and explainability. Paper 1's methodological novelty (unifying relational learning with ICL), scale of evaluation, and relevance to the rapidly growing foundation model paradigm give it higher potential impact.
Paper 1 explores the internal reasoning geometry of LLMs, introducing 'process isomers' to map diverse Chain-of-Thought trajectories. This offers profound implications for interpretability, reward modeling, and understanding complex LLM reasoning. While Paper 2 provides a strong, rigorous contribution to Knowledge Graphs via in-context learning, Paper 1's focus on foundational LLM reasoning mechanics promises a broader and more transformative impact across the wider, fast-moving AI community.
Paper 1 presents a concrete, novel KG foundation modeling approach that integrates transferable relation representations with structured in-context learning via retrieval and a Prior-data Fitted Network, validated at scale on 57 benchmarks with strong generalization to unseen graphs—high methodological and application impact for KG reasoning and foundation models. Paper 2 raises timely, important concerns about LLM-based peer review and provides empirical evidence of gaming/diversity issues, but as a position paper its scientific impact is more policy/normative and likely narrower in methodological contribution than Paper 1’s broadly reusable modeling advances.
Paper 2 addresses a critical and highly timely bottleneck in the rapidly expanding field of omni-modal LLMs: token explosion and computational inefficiency. Its training-free, query-guided token pruning method offers immediate practical benefits in latency and memory reduction for real-world applications. While Paper 1 presents a novel approach to knowledge graph reasoning, Paper 2's potential impact is significantly broader due to the widespread adoption and massive computational demands of multimodal foundation models.
KGPFN addresses a fundamental challenge in knowledge graph foundation models by introducing in-context learning with structured context, demonstrating results across 57 benchmarks. It advances foundational understanding of transferable relational reasoning with broad applicability across KG tasks. Paper 2 (SPIN) is a solid engineering contribution—a planning wrapper for industrial LLM agents—but is more narrowly scoped, incremental in nature, and evaluated on only two benchmarks. KGPFN's novelty (PFN framework for KGs, multi-scale context), methodological depth, and breadth of impact give it substantially higher scientific impact potential.
Paper 1 is likely to have higher scientific impact due to stronger methodological novelty and broader cross-field relevance: it advances foundation-model-style in-context learning for structured relational reasoning, with multi-graph pretraining and extensive evaluation across 57 KG benchmarks, suggesting robustness and generality. Its ideas (structured ICL, retrieval-based global context, prior-data fitted aggregation) can influence KG reasoning, graph ML, and foundation model adaptation. Paper 2 is impactful for diagram generation and introduces a useful RL reward plus a large dataset, but its scope is narrower (diagram/code domains) and the main innovation is more application-specific.
Paper 2 (KGPFN) has higher likely scientific impact: it targets a broadly relevant, timely problem (foundation models for KGs) with a novel in-context learning mechanism combining local neighborhood evidence and relation-specific global retrieval within a Prior-Data Fitted Network. It is evaluated rigorously across 57 benchmarks and emphasizes cross-graph generalization, making it broadly applicable across domains using KGs. Paper 1 is impactful for enterprise applications, but appears more domain-specific and systems-oriented, with narrower generalization and evaluation scope despite strong practical utility.
KGPFN introduces a novel foundation model paradigm for knowledge graphs that unifies transferable relational learning with in-context learning through Prior-data Fitted Networks, demonstrating strong results across 57 benchmarks. This addresses a fundamental challenge in KG reasoning—generalization to unseen entities and relations—with broad implications for knowledge representation and reasoning. Paper 2, while practically useful for reducing token waste in synthetic data generation, is more incremental as an engineering optimization (rule-based validators for early rejection) with narrower conceptual contribution. KGPFN's methodological novelty and breadth of impact give it higher potential.
KGPFN addresses a fundamental challenge in knowledge graph foundation models by introducing in-context learning capabilities, demonstrating strong results across 57 benchmarks without fine-tuning. Its breadth of impact is substantial—knowledge graphs underpin many AI applications. While Paper 2 makes a solid contribution to robust optimization via learned scenario reduction, it targets a narrower problem domain. KGPFN's novelty in unifying transferable relational learning with structured in-context learning, combined with its extensive empirical validation and broader applicability across the AI/ML landscape, gives it higher potential impact.
Paper 1 introduces a highly novel architectural framework for Knowledge Graph Foundation Models, enabling robust in-context learning across unseen graphs. Its extensive validation on 57 benchmarks demonstrates significant methodological rigor and performance. While Paper 2 provides valuable interpretability insights for EEG models, Paper 1 offers broader methodological innovation and wider potential impact across the diverse domains that rely on knowledge graphs, such as search, bioinformatics, and recommendation systems.
KGPFN addresses a more impactful and timely problem—building foundation models for knowledge graphs with in-context learning capabilities. It introduces a novel architecture combining Prior-data Fitted Networks with structured KG reasoning, evaluated across 57 benchmarks showing strong zero-shot generalization. This aligns with the high-impact trend of foundation models and transfers insights from LLM-style in-context learning to structured data. Paper 1, while solid, addresses the more incremental problem of personalized KG summarization using coreset theory, with narrower scope and fewer potential downstream applications.
Paper 2 introduces a foundational approach to Knowledge Graphs using in-context learning, demonstrating strong zero-shot adaptation across 57 diverse benchmarks. Its methodological innovation in handling structured contexts and its broad applicability to general AI reasoning, NLP, and data integration give it a higher potential for widespread cross-disciplinary scientific impact compared to Paper 1, which focuses on the narrower domain of educational knowledge tracing.
Paper 2 introduces a paradigm-shifting approach by successfully adapting in-context learning to Knowledge Graph foundation models via Prior-Data Fitted Networks. Its ability to outperform fine-tuned models using only in-context learning across 57 diverse benchmarks demonstrates exceptional methodological rigor and broad generalization. While Paper 1 offers a practical, clever framework for SLM mathematical reasoning, Paper 2 has wider cross-disciplinary applications (e.g., biomedicine, finance) and represents a more fundamental advancement in bridging structured graph reasoning with modern foundation model capabilities.
Paper 2 presents a concrete, novel methodological contribution (KGPFN) that unifies transferable KG relation regularities with structured in-context learning via prior-data fitted networks, plus strong empirical validation on 57 benchmarks and open-source code—signs of rigor, reproducibility, and near-term uptake. Its advances are broadly relevant to machine learning, knowledge graphs, retrieval/ICL, and graph reasoning, with clear downstream applications (search, recommendation, scientific KG mining). Paper 1 is a timely perspective and gap analysis for higher education, but is less technically novel and lacks validated system results, limiting immediate scientific impact.
Paper 1 proposes a novel KG foundation model architecture that explicitly integrates inference-time in-context learning with transferable relational structure, and demonstrates broad effectiveness via large-scale evaluation (57 benchmarks) and cross-graph generalization—likely to influence KG reasoning/model design across tasks and domains. Its methodological contribution (Prior-data Fitted Network + local/global structured context retrieval) is broadly applicable beyond a single dataset. Paper 2 is timely and useful as an evaluation benchmark for agentic fact discovery, but its impact is more domain-specific (political facts) and primarily evaluative rather than advancing core modeling methodology.
Paper 1 presents a rigorous, empirically validated KG foundation model with experiments on 57 benchmarks, novel architectural contributions (combining PFN with in-context learning for KGs), and clear reproducibility via code release. Paper 2 proposes a speculative framework combining Buddhist psychology with conversational AI for PTSD treatment but lacks empirical validation, clinical trials, or rigorous evaluation. Its neuroscience claims (e.g., 'upstream pathway dissolution') are largely theoretical and unsubstantiated. Paper 1's methodological rigor, breadth of evaluation, and contribution to a rapidly growing field (foundation models) give it substantially higher scientific impact potential.
Paper 1 addresses a critical, high-stakes real-world problem (sepsis management in ICUs) by innovatively combining LLMs with a learned Clinical World Model. The propose-simulate-refine workflow for sequential decision-making demonstrates strong methodological rigor and directly bridges the gap between AI reasoning and safe clinical execution. While Paper 2 presents a strong technical advancement in knowledge graphs, Paper 1's potential to save lives and influence the rapidly growing intersection of AI and healthcare gives it a broader and more immediate scientific and societal impact.