HyperNear: Unnoticeable Node Injection Attacks on Hypergraph Neural Networks

Tingyi Cai, Yunliang Jiang, Ming Li, Lu Bai, Changqin Huang, Yi Wang

Introduction

Hypergraph Neural Networks (HNNs) are increasingly used to model complex, multi-way relationships in real-world data, such as multiple authors collaborating on a single paper. While adversarial attacks on traditional pairwise graphs are well-studied, the security vulnerabilities of hypergraphs remain largely underexplored.

Because hypergraphs amplify minor perturbations through their complex, overlapping structures, they are highly vulnerable to adversarial attacks. However, this same sensitivity makes attacks easy to spot. Naive node injection attacks—adding malicious nodes to the network to skew predictions—drastically alter the network's topology and destroy its homophily (the tendency of similar nodes to connect). If an attack destroys homophily, defenders can easily detect it.

To address this, researchers have introduced HyperNear (Node injEction Attacks on hypeRgraph neural networks), the first black-box node injection attack framework specifically tailored for HNNs. By constraining the attack to preserve the network's homophily, HyperNear successfully degrades model performance while remaining virtually undetectable to defenders.

The HyperNear Framework

HyperNear operates in a strict black-box setting, meaning the attacker only knows the input data, not the model's internal weights. The attack consists of four main steps designed to severely disrupt an HNN's predictive accuracy without leaving obvious structural traces:

HyperNear Framework
  1. Feature Generation: Instead of creating random features for injected nodes, HyperNear generates features by adding small, controlled perturbations to existing node features, ensuring they blend in naturally.
  2. Hyperedge Selection: The framework randomly selects target hyperedges to inject the new nodes into, avoiding predictable attack patterns.
  3. Injection & Structural Update: The injected nodes are initially fully connected to the selected hyperedge. Then, using gradient information, the hyperedge is strategically "split" to maximize the classification error of the target model.
  4. Homophily-Preserving Objective: Standard attacks simply maximize model loss. HyperNear introduces a novel loss function that maximizes model error minus a penalty for changing the Feature-based Homophily (FHH). This forces the optimization process to find adversarial perturbations that keep the network's homophily ratio nearly identical to its pre-attack state.

Key Insights

  • Topological Vulnerability is a Double-Edged Sword: Mathematical proofs (via Taylor expansion) show that HNNs amplify structural perturbations. A single injected node propagates errors through complex hyperedges, severely damaging model accuracy. However, this amplification is exactly why naive attacks are so loud and detectable.
  • Homophily as a Cloaking Device: Naive attacks naturally shift a graph from homophily (similar nodes connected) to heterophily (dissimilar nodes connected). By mathematically constraining the attack to preserve homophily, the attacker forces the malicious nodes to mimic legitimate structural patterns, rendering the attack invisible to standard anomaly detection.
  • Dual-Perturbation is Highly Effective: HyperNear actively rewires the local structure (splitting hyperedges) in addition to manipulating node features. This combined feature-structure attack is devastating to HNNs.

Experimental Results

The authors evaluated HyperNear on five standard real-world hypergraph datasets (Cora-CA, DBLP-CA, Citeseer, Cora, & PubMed) used for hypernode classification tasks.

High Attack Efficacy: HyperNear significantly outperformed baseline graph attack methods like Random, Node Degree Attack, and Fast Gradient Attack. For example, on the UniSAGE model using the Cora-CA dataset, HyperNear dropped classification accuracy from 74.13% to 60.24%. On PubMed, accuracy plummeted from 74.31% to 55.31%.

Exceptional Stealth: Visualizations of the post-attack data demonstrated that the compromised hypergraphs were virtually indistinguishable from the clean, unattacked networks.

t-SNE Visualization of Injected Nodes

Strong Transferability: Because HyperNear exploits fundamental structural properties of hypergraphs rather than model-specific quirks, it transferred successfully across 8 different HNN architectures (including HyperGCN, HGNN, and UniGCNII), consistently degrading performance in a black-box setting.

Limitations and Future Work

While empirical evidence strongly suggests the attack is unnoticeable, a formal, theoretical characterization of detectability under hypergraph-specific metrics remains an open mathematical challenge. Furthermore, most existing adversarial defenses are built for standard pairwise graphs and do not translate well to hypergraphs. Designing specialized, robust defense mechanisms tailored for HNNs is a critical next step for the field.

Summary updated

BibTeX
@inproceedings{cai2025hypernear,
  author = {Tingyi Cai and Yunliang Jiang and Ming Li and Lu Bai and Changqin Huang and Yi Wang},
  title = {{HyperNear: Unnoticeable Node Injection Attacks on Hypergraph Neural Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=Toy3nwPhk4},
}
Figure