Triple set prediction (TSP) is to recover missing relational triples in a knowledge graph by predicting the triple set instead of isolated links. Existing approaches predominantly rely on the subgraph-based completion paradigm, where the original graph is first partitioned into local subgraphs which are then independently completed. Such a paradigm suffers from fragmented structural reasoning, limited cross subgraph dependency modeling, and missing predictions across subgraphs. This paper proposes LatentDiff, a novel unified latent generative framework for TSP, which reformulates knowledge graph completion as latent space graph generation. LatentDiff first learns a compact latent representation using a relation-aware residual-quantized knowledge graph autoencoder, which encodes the whole graph into relation-aware latent embeddings, quantizes them with chunked residual codebooks, and reconstructs triples through a factorized decoder. On top of this latent space, we introduce an observation-anchored latent graph diffusion model, where the target latent graph representation is perturbed toward the observed latent. The reverse process recovers missing triples through progressive latent denoising. Experiments on three benchmark datasets show that LatentDiff outperforms the SOTA in terms of F_{tsp} by 5.4 percentage points on average. Code: https://anonymous.4open.science/r/LKGDiff-44A5.
Figures & tables
Figure 1. Comparison between subgraph-based completion paradigm and our unified latent generation paradigm.
Figure 2. Overview of LatentDiff. Stage I learns a relation-aware residual-quantized latent space for KG reconstruction. Stage II performs observation-anchored latent diffusion to recover the target KG from the observed KG.
Datasets
Entity
Relation
Train
Valid
Test
Wiki79k
7,983
85
57,033
6,337
15,843
Wiki143k
13,928
109
103,415
11,490
28,727
CFamily
2,378
12
16,549
1,839
4,598
Table 1. Statistics of datasets in experiments.
Datasets
Models
Number of Triples in
RS-POWA Metrics
CWA Metrics
Tpred
TpredPOWA
TpredPOWA+
JPrecision
STRecall
FTSP
F1†
JPrecision
FTSP
Wiki79k
HAKE ( Zhang et al., 2020 )
125 ± 87
119 ± 83
30 ± 7
0.246 ± 14.8%
0.044 ± 0.4%
0.075 ± 0.3%
0.004
0.240
0.074
PairRE ( Chao et al., 2020 )
29742 ± 105
10217 ± 51
2901 ± 7
0.191 ± 0.1%
0.428 ± 0.0%
0.264 ± 0.2%
0.187
0.097
0.158
AstarNet ( Zhu et al., 2023 )
5689 ± 287
1750 ± 116
1328 ± 52
0.496 ± 0.8%
0.289 ± 0.5%
0.365 ± 0.2%
0.143
0.233
0.258
ULTRA ( Galkin et al., 2024 )
9743 ± 0
2945 ± 0
1062 ± 0
0.235 ± 0.0%
0.258 ± 0.0%
0.246 ± 0.0%
0.104
0.109
0.153
GPHT(HAKE) ( Zhang et al., 2024 )
209 ± 47
191 ± 47
44 ± 8
0.220 ± 8.0%
0.053 ± 0.4%
0.085 ± 1.1%
0.006
0.210
0.084
Table 2. The results on Wiki79k and Wiki143k, where TpredPOWA+ is the number of correctly predicted test triples, and TpredPOWA is the triple set that can be judged under the RS-POWA assumption. The best results are in bold, and the second-best results are underlined. FTSP is the primary comparison metric. † : Standard F1 under RS-POWA.
Models
Number of Triples in
CWA Metrics
Tpred
TpredCWA
TpredCWA+
JPrecision
STRecall
FTSP
F1†
HAKE ( Zhang et al., 2020 )
3186 ± 543
3186 ± 543
1788 ± 321
0.561 ± 1.8%
0.624 ± 5.9%
0.591 ± 3.1%
0.459
PairRE ( Chao et al., 2020 )
5732 ± 2062
5732 ± 2062
1747 ± 694
0.305 ± 1.8%
0.616 ± 13.7%
0.408 ± 4.9%
0.338
RGCN ( Schlichtkrull et al., 2018 )
30608 ± 3443
30608 ± 3443
3026 ± 137
0.099 ± 6.0%
0.811 ± 0.5%
0.176 ± 5.2%
0.172
CompGCN ( Vashishth et al., 2019 )
38931 ± 3745
38931 ± 3745
2599 ± 47
0.067 ± 4.8%
0.752 ± 0.3%
0.123 ± 1.7%
0.119
AstarNet ( Zhu et al., 2023 )
2075 ± 360
2075 ± 360
911 ± 187
0.439 ± 1.7%
0.445 ± 4.6%
0.442 ± 3.3%
0.273
Table 3. The results on the CFamily dataset, where TpredCWA+ is the set of correctly predicted test triples. The best results are in bold, and the second-best results are underlined. FTSP is the primary comparison metric. † : Standard F1 under CWA.
Variant
Wiki79k
Wiki143k
CFamily
Avg.
LatentDiff
0.585
0.521
0.691
0.599
LatentDiff-Subgraph
0.539
0.472
0.653
0.555
w/o Relational view Attention
0.576
0.495
0.674
0.582
w/o CRVQ (VQ-VAE)
0.030
0.075
0.455
0.187
w/o Quantization (Vanilla AE)
0.498
0.414
0.332
0.415
w/o Factorized Decoder
0.557
0.481
0.659
0.566
Table 4. Ablation study of LatentDiff on three datasets. We report FTSP for TSP evaluation.
Figure 3. Effect of codebook size in CFamily and Wiki79k.
Figure 4. Performance under different CRVQ configurations in CFamily.
Figure 5. Effect of diffusion steps in CFamily and Wiki79k.
Dataset
#Train
#Retained
#Uncovered
Uncovered Ratio
#Test
#Same-subgraph
#Partition-boundary
Boundary Ratio
CFamily
16,549
16,514
35
0.21%
4,598
4,551
47
1.02%
Wiki79k
57,033
53,937
3,096
5.43%
15,843
12,452
3,391
21.40%
Wiki143k
103,415
88,984
14,431
13.95%
28,727
16,781
11,946
41.58%
Table 5. Partition-induced fragmentation statistics on three datasets.
Target Triple
GPHT
DiffTSP
LatentDiff
( October , follows, September )
Missed
Missed
Recalled (s=0.98)
( 2006 Asian Games , follows, 2002 Asian Games )
Missed
Missed
Recalled (s=0.97)
( Châlons-en-Champagne , twinned with, Neuss )
Missed
Missed
Recalled (s=0.95)
( Épinal , located in, Vosges )
Missed
Missed
Recalled (s=0.91)
( Braga , shares border with, Guimarães )
Missed
Missed
Recalled (s=0.89)
( Bonn , country, Weimar Republic )
Missed
Missed
Recalled (s=0.75)
Table 6. Cases of cross-subgraph triples.
Dataset
Method
Recalled
STRecallbd
Wiki79k
GPHT
0/3,391
0.000
DiffTSP
0/3,391
0.000
LatentDiff
178/3,391
0.229
Wiki143k
GPHT
0/11,946
0.000
DiffTSP
0/11,946
0.000
LatentDiff
456/11,946
0.195
Table 7. Diagnostic evaluation on partition-boundary test triples. STRecallbd is computed only over the partition-boundary subset.
Dataset
GPHT
DiffTSP
LatentDiff
Speedup
CFamily
46.25
8.13
1.64
4.9 ×
Wiki79k
151.94
83.77
12.79
6.5 ×
Wiki143k
583.69
101.07
35.93
2.8 ×
Table 8. Inference time (s) comparison and speedup. The speedup is computed against the fastest baseline DiffTSP.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Hyperparameter
CFamily
Wiki79k
Wiki143k
Stage-I Training
Encoder hidden dimension
64
64
32
Chunks of CRVQ K
4
4
4
Number of residual quantizers Lc
4
4
2
Latent dimension
16
16
16
Codebook size C
1024
1024
2048
Appendix
Table 9. Training hyperparameters on three datasets.
Variant
CFamily
Wiki79k
Wiki143k
LatentDiff
0.9703
0.6918
0.7145
w/o Relational view Attention
0.9057
0.6229
0.6927
w/o CRVQ (VQ-VAE)
0.4591
0.0575
0.1098
w/o Quantization (Vanilla AE)
0.9898
0.7187
0.7339
w/o Factorized Decoder
0.8895
0.5891
0.6219
Appendix
Table 10. Stage-I reconstruction ablation results. We report reconstruction RF1 on three datasets.
Figure 6. Sensitivity to the observed ratio ρobs . We vary the ratio of observed triples from 0.5 to 0.9 and report FTSP on CFamily and Wiki79k.
Figure 7. Performance under different CRVQ configurations in Wiki79k.
Dataset
Prediction Time (s)
Peak Memory (MB)
S=50
S=100
S=50
S=100
CFamily
0.72
1.64
2,136
2,136
Wiki79k
12.79
22.96
12,366
12,366
Wiki143k
35.93
45.76
19,872
19,872
Appendix
Table 11. Inference efficiency of LatentDiff under different diffusion steps.
Triple set prediction (TSP) aims to discover missing facts from an incomplete knowledge graph without predefined queries. Existing approaches typically construct the predicted set through triple-level scoring, sometimes preceded by entity pair filtering that can exclude valid missing facts. We propose DiffTSP, a conditional discrete diffusion model that formulates missing fact discovery as conditional subgraph generation. In each subgraph, DiffTSP directly predicts the missing relational structure without a separate entity pair selection stage. The model learns to generate masked target relation states at different corruption levels, with the observed support subgraph retained as conditioning context. Our structure-aware denoising network integrates a Relational Context Encoder, which captures local relational patterns through relation-guided message passing, and a Relational Graph Diffusion Transformer, which models broader structural interactions through relational attention. During generation, partially generated relations can also serve as provisional context for subsequent predictions. Experiments on three public datasets demonstrate improved TSP performance over strong baselines. Additional analyses show lower conflict rates in the predicted triple sets relative to the evaluated baselines. Code: https://anonymous.4open.science/r/DiffTSP-0F92/.
Jihong Guan, Jiaqi Wang, Han Cai +5
School of Computer Science and Technology, Tongji University, Shanghai, China · School of Computer Science, Fudan University, Shanghai, China
Knowledge graphs (KGs) organize real-world knowledge as triplets and underpin many downstream applications. Due to their inherent incompleteness, knowledge graph completion (KGC) is widely studied and is typically formulated as triplet prediction, with link prediction as the dominant paradigm. However, this formulation focuses on the incompleteness of triplet-wise information and overlooks the incompleteness of entity-relation compatibility information. To address this limitation, we introduce a relation set completion task (RSC), which complements the link prediction task and aims to reason about missing relations that are semantically compatible with a given entity. We further propose a Relation Set Embedding model (RelSetE), which models latent patterns among the observed relations of entities to infer missing ones. To evaluate RelSetE, we derive three benchmark datasets from standard KG benchmarks. Extensive experiments demonstrate that RelSetE effectively captures entity-relation compatibility patterns and performs favorably in inferring missing relations of entities. Code and data are publicly available.
Zihao Zheng, Borui Cai, Yao Zhao +2
School of Information Technology, Deakin University, VIC 3125, Australia · Hangzhou International Innovation Institute, Beihang University, Hangzhou 311115, China · School of Information Technology, Victoria University, VIC 3011, Australia +1
Knowledge Graphs (KGs) are widely used to represent structured knowledge, yet their automatic construction, especially with Large Language Models (LLMs), often results in incomplete or noisy outputs. Knowledge Graph Completion (KGC) aims to infer and add missing triples, but most existing methods either rely on structural embeddings that overlook semantics or language models that ignore the graph's structure and depend on external sources. In this work, we present OMNIA, a two-stage approach that bridges structural and semantic reasoning for KGC. It first generates candidate triples by clustering semantically related entities and relations within the KG, then validates them through lightweight embedding filtering followed by LLM-based semantic validation. OMNIA performs on the internal KG, without external sources, and specifically targets implicit semantics that are most frequent in LLM-generated graphs. Extensive experiments on multiple datasets demonstrate that OMNIA significantly improves F1-score compared to traditional embedding-based models. These results highlight OMNIA's effectiveness and efficiency, as its clustering and filtering stages reduce both search space and validation cost while maintaining high-quality completion.
Frédéric Ieng, Soror Sahri, Mourad Ouzzani +5
LIPADE, Université Paris Cité, Paris, France · Qatar Computing Research Institute, HBKU, Doha, Qatar · Universität zu Lübeck, Germany +3