SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.15773 · 2026

From Diffusion to Reaction-Diffusion: A Dynamical-Systems View of Oversmoothing in Hypergraph Neural Networks

Guiying Yan, Zhiheng Zhou, Yancheng Chen, Mengyao Zhou, Dengyi Zhao, Xingqin Qi

arXiv · PDF · Open in the Atlas

Code that ran

1 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2607.15773.json · badge: /api/ran/2607.15773.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
CASZhouzhiheng/HNRD community
Papers with Code archive
1 ran · 2 no recorded run
FunctionStatusWhere it lives
IncidenceModulation Ran
ran on a synthesized input
CASZhouzhiheng/HNRD/hnrd/models.py
code served (permissive licence) · get_code("077571db80768366")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 1, dtype family float, shape (7,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from dataclasses import dataclass

@dataclass(frozen=True)
class IncidenceOperator:
    """Incidence-domain implementation of G and G^T for hypergraphs."""
    node_ids: torch.Tensor
    edge_ids: torch.Tensor
    inverse_sqrt_node_degree: torch.Tensor
    node_degree: torch.Tensor
    edge_sizes: torch.Tensor
    num_nodes: int
    num_edges: int

    @classmethod
    def from_edge_index(cls, edge_index: torch.Tensor, num_nodes: int, device: torch.device) -> 'IncidenceOperator':
        node_ids = edge_index[0].long().to(device)
        _, edge_ids = torch.unique(edge_index[1].long().to(device), sorted=True, return_inverse=True)
        num_edges = int(edge_ids.max().item()) + 1
        node_degree = torch.bincount(node_ids, minlength=num_nodes).float().clamp_min(1.0)
        edge_sizes = torch.bincount(edge_ids, minlength=num_edges).float().clamp_min(1.0)
        return cls(node_ids, edge_ids, node_degree.rsqrt(), node_degree, edge_sizes, num_nodes, num_edges)

    def edge_mean(self, features: torch.Tensor) -> torch.Tensor:
        output = features.new_zeros((self.num_edges, features.size(-1)))
        output.index_add_(0, self.edge_ids, features[self.node_ids])
        return output / self.edge_sizes.unsqueeze(-1)

    def gradient(self, features: torch.Tensor) -> torch.Tensor:
        normalized_features = features * self.inverse_sqrt_node_degree.unsqueeze(-1)
        normalized_edge_mean = self.edge_mean(normalized_features)
        return normalized_features[self.node_ids] - normalized_edge_mean[self.edge_ids]

    def divergence(self, incidence_features: torch.Tensor) -> torch.Tensor:
        scale = self.inverse_sqrt_node_degree[self.node_ids].unsqueeze(-1)
        direct = incidence_features.new_zeros((self.num_nodes, incidence_features.size(-1)))
        direct.index_add_(0, self.node_ids, incidence_features * scale)
        edge_sum = incidence_features.new_zeros((self.num_edges, incidence_features.size(-1)))
        edge_sum.index_add_(0, self.edge_ids, incidence_features)
        correction = incidence_features.new_zeros((self.num_nodes, incidence_features.size(-1)))
        correction.index_add_(0, self.node_ids, edge_sum[self.edge_ids] / self.edge_sizes[self.edge_ids].unsqueeze(-1) * scale)
        return direct - correction

class IncidenceModulation(nn.Module):
    """Learn normalized diagonal weights A_theta(X) on the incidence space."""

    def __init__(self, hidden_dim: int, epsilon: float=0.0001):
        super().__init__()
        self.epsilon = epsilon
        self.node_projection = nn.Linear(hidden_dim, hidden_dim, bias=False)
        self.edge_projection = nn.Linear(hidden_dim, hidden_dim, bias=False)
        self.score = nn.Sequential(nn.Linear(2 * hidden_dim, hidden_dim), nn.LeakyReLU(negative_slope=0.2), nn.Linear(hidden_dim, 1))

    def forward(self, features: torch.Tensor, operator: IncidenceOperator) -> torch.Tensor:
        edge_features = operator.edge_mean(features)
        context = torch.cat((self.node_projection(features[operator.node_ids]), self.edge_projection(edge_features[operator.edge_ids])), dim=-1)
        raw = self.score(context).view(-1)
        exp_raw = raw.exp()
        denom = features.new_zeros(operator.num_nodes)
        denom.index_add_(0, operator.node_ids, exp_raw)
        normalized = exp_raw / denom[operator.node_ids].clamp_min(1e-12)
        return (1.0 - self.epsilon) * normalized + self.epsilon / operator.node_degree[operator.node_ids]


# Create a simple hypergraph: 5 nodes, 3 edges
# Edge 0: nodes [0, 1]
# Edge 1: nodes [1, 2, 3]
# Edge 2: nodes [3, 4]
edge_index = torch.tensor([
    [0, 1, 1, 2, 3, 3, 4],  # node indices
    [0, 0, 1, 1, 1, 2, 2]   # edge indices
], dtype=torch.long)

num_nodes = 5
operator = IncidenceOperator.from_edge_index(edge_index, num_nodes, torch.device('cpu'))

INIT_ARGS = {
    'hidden_dim': 4,
    'epsilon': 0.0001
}

ARGS = {
    'features': torch.randn(num_nodes, 4),
    'operator': operator
}

if __name__ == '__main__':
    model = IncidenceModulation(**INIT_ARGS)
    output = model(**ARGS)
    print("Output shape:", output.shape)
    print("Output:", output)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (7,) — shape (7,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
HNRD Not yet run
unverified (harvested, no recorded run)
CASZhouzhiheng/HNRD/hnrd/models.py
code served (permissive licence) · get_code("49b3d3acae693f66")
How it ran

no invocation recorded.

IncidenceOperator Not yet run
unverified (harvested, no recorded run)
CASZhouzhiheng/HNRD/hnrd/models.py
code served (permissive licence) · get_code("b95a399de771bc94")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Higher-order couplings give hypergraph neural networks strong expressive power, but they also make deep propagation vulnerable to rapid representation collapse, especially when multi-way interactions induce strong feature mixing. This paper studies this issue from a dynamical-systems perspective and develops a reaction-diffusion framework for depth-resistant hypergraph learning. Using hypergraph gradient and divergence operators, we formulate message passing as a learnable incidencelevel diffusion equation. Analyzing its long-time behavior reveals that pure diffusion generates a global continuous semiflow that exponentially contracts the null-mode-free component of node representations and drives the associated Dirichlet energy to zero. This identifies hypergraph oversmoothing as an intrinsic transverse-energy dissipation process induced by higher-order diffusion. Motivated by this characterization, we propose Hypergraph Neural Reaction-Diffusion (HNRD). Instead of relying on heuristic residual shortcuts, HNRD introduces a reaction term that acts only on the transverse component, combining instantaneous compensation of diffusion-induced dissipation with bounded feedback that stabilizes the transverse energy at a positive learnable level. The resulting dynamics are globally well posed and preserve nontrivial node-discriminative variation, ensuring that the null-mode-free Dirichlet energy remains bounded away from zero. A forward-Euler discretization yields a practical HNRD layer with a step-size condition for stable deep propagation. Experiments on benchmark and synthetic heterophilic hypergraphs show that HNRD consistently outperforms representative hypergraph baselines. Depth-wise, robustness, and runtime analyses further demonstrate that HNRD preserves stable accuracy and nonzero Dirichlet energy under deep propagation and perturbed settings, while maintaining practical efficiency. These results demonstrate that incidence-level dynamical priors offer a principled route to designing deep hypergraph architectures that preserve higher-order expressiveness without collapsing under propagation.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2607.15773")
get_code_for_paper("2607.15773")
have("2607.15773")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2607.15773.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2607.15773.svg)](https://syntology.ai/paper/2607.15773)

Connect an agent — have() is free.