Scalable and effective negative sample generation for hyperedge prediction

Shilin Qu, Weiqing Wang, Yuan-Fang Li, Quoc Viet Hung Nguyen, Hongzhi Yin

Introduction

In complex systems such as co-authorship networks, drug-target interactions, and metabolic pathways, relationships often involve more than two entities. Hypergraphs provide a robust mathematical framework for these systems, where "hyperedges" connect arbitrary sets of nodes. A core challenge in hypergraph analysis is hyperedge prediction: determining whether a specific group of nodes is likely to form a relationship.

Training effective prediction models requires both positive examples (observed hyperedges) and negative examples (non-existent hyperedges). However, the number of potential negative samples grows exponentially with the number of nodes, making it impossible to sample the entire space. Most current methods rely on simple random sampling, which produces "easy" negatives that fail to challenge the model. While some generative approaches like GANs have been proposed to create "harder" negatives, they often struggle with scalability and training stability.

The SEHP Framework

To address these limitations, we introduce SEHP (Scalable and Effective Negative Sample Generation for Hyperedge Prediction). SEHP leverages conditional diffusion models to generate high-quality negative samples that reside near the decision boundary, forcing the discriminator to learn more nuanced features.

Architecture Overview

The standard hyperedge prediction pipeline typically involves encoding nodes into a latent space, aggregating these embeddings into a hyperedge representation, and passing them through a classifier.

The standard hyperedge prediction pipeline involving an HGNN encoder and an MLP classifier.

SEHP enhances this process by introducing a dedicated Negative Hyperedge Generator based on a diffusion process. Unlike traditional diffusion models that aim to generate perfect positive samples, SEHP's generator is conditioned to produce samples that are "hard" for the discriminator to distinguish from real hyperedges.

Key Innovations

  1. Conditional Diffusion for Hard Negatives: The model starts with a positive hyperedge embedding and iteratively "denoises" it toward the decision boundary. This iterative refinement allows the generator to find subtle weaknesses in the current discriminator.
  2. Structural Injection: To ensure negatives are contextually relevant, SEHP injects global structural information from the surrounding sub-hypergraph into the diffusion process. This prevents the model from generating negatives that are globally impossible.
  3. The Latent Shortcut (SEHP-epre): Mapping continuous embeddings back to discrete node IDs (Node ID Extraction) is a major bottleneck. The authors discovered that the model can be trained effectively by using the latent representations of generated negatives directly, skipping the discrete mapping step. This variant, SEHP-epre, provides a massive speedup with negligible loss in accuracy.
The SEHP training loop, showing the interaction between the Negative Hyperedge Generator (top) and the Discriminator (bottom).

Experimental Results

SEHP was evaluated across six real-world datasets, ranging from small citation networks (Cora, Citeseer) to massive ingredient networks (Recipe200k).

  • State-of-the-Art Accuracy: SEHP consistently outperformed existing baselines. Notably, on the Cora dataset, it achieved a nearly 20% improvement in AUROC over previous generative methods like AHP.
  • Unprecedented Scalability: While previous generative methods failed to run on the Recipe200k dataset (240k+ nodes) due to memory constraints, SEHP handled it efficiently. It outperformed traditional node-representation baselines by 34.5% in AUROC on this large-scale task.
  • Efficiency: The SEHP-epre variant demonstrated remarkable efficiency, running 20 to 71 times faster than the standard version while maintaining competitive performance.

Conclusion

SEHP represents a significant step forward in hyperedge prediction by successfully adapting diffusion models for negative sample generation. By focusing on the decision boundary and utilizing latent-space shortcuts, the framework overcomes the scalability and quality issues that plagued previous generative approaches. Future work will look toward extending this framework to dynamic hypergraphs where relationships evolve over time.

Summary updated

BibTeX
@article{qu2026scalable,
  author = {Shilin Qu and Weiqing Wang and Yuan-Fang Li and Quoc Viet Hung Nguyen and Hongzhi Yin},
  title = {{Scalable and effective negative sample generation for hyperedge prediction}},
  journal = {Neural Networks},
  year = {2026},
  doi = {10.1016/j.neunet.2025.108034},
}
Figure