FlowNeg: GFlowNet-Guided Diverse Hard Negative Sampling for Knowledge Graph Embedding
FlowNeg introduces a context-conditioned hierarchical generative flow network for diverse hard negative sampling in knowledge graph embedding (KGE) The method amortizes reward-proportional sampling without normalizing composite rewards over the full entity set, selecting type then entity hierarchically Terminal reward combines bounded model-based hardness with a training-only structural score for held-out-positive collision over relation-specific type-compatible support FlowNeg outperforms EMU a
Analysis
TL;DR
- FlowNeg introduces a context-conditioned hierarchical generative flow network for diverse hard negative sampling in knowledge graph embedding (KGE)
- The method amortizes reward-proportional sampling without normalizing composite rewards over the full entity set, selecting type then entity hierarchically
- Terminal reward combines bounded model-based hardness with a training-only structural score for held-out-positive collision over relation-specific type-compatible support
- FlowNeg outperforms EMU and IF-NS across 24 of 25 benchmark cells with average MRR gains of +0.0172 and +0.0160 respectively
- Controlled experiments on FB15k-237/RotatE show FlowNeg achieves 0.359±0.001 MRR versus 0.346±0.002 for EMU with near-uniform diversity and low collision
Why It Matters
This work addresses a critical bottleneck in knowledge graph embedding: negative sampling quality directly determines whether models learn from informative counterexamples or waste updates on implausible corruptions. By combining GFlowNet's mode-covering generation with structured negative sampling, it offers a principled alternative to both uniform sampling and hard-negative mining approaches that suffer from diversity collapse.
Technical Details
- Hierarchical generative flow network: Given a positive triple and corruption side, FlowNeg first selects a relation type, then an entity, operating over relation-specific type-compatible support rather than the full entity set
- Composite terminal reward: Combines bounded model-based hardness with a training-only structural score penalizing held-out-positive collision, avoiding normalization over the entire entity set
- Trajectory balance specialization: The authors derive the reward formulation and specialize standard trajectory balance, providing multiplicative bounds on how residual imbalance perturbs terminal and mode probability
- Extensive evaluation: Tested across a five-seed grid spanning five architectures and five benchmarks, with additional 15-seed controlled experiments on FB15k-237/RotatE fixing negative count, diagnostic budget, and compute
Industry Insight
- The mode-covering approach to negative generation could generalize beyond KGE to other domains where diverse counterexample sampling is critical, such as recommendation systems and anomaly detection
- The tradeoff between hardness and diversity captured by the composite reward suggests practitioners should avoid purely gradient-based hard negative mining, which risks collision with true positives
- The bounded reward formulation that avoids full normalization makes this approach computationally scalable to large knowledge graphs where entity sets are massive
Disclaimer: The above content is generated by AI and is for reference only.