Scaled-NAP loss for differentiable graph pooling
Source paper: Scaled Null-Adjusted Persistence: A Multiscale Bridge between Modularity and Persistence arXiv:2608.30934 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Add a Scaled-NAP auxiliary loss to a graph neural network whose node embeddings are converted into soft community or pooling assignments. The exponent alpha controls the resolution of the learned partition: alpha=0 favors locally persistent, fine-grained groups, while alpha=1 recovers modularity and its preference for larger volume-balanced groups.
Formulas
Mathematical statement
For a weighted undirected graph with adjacency weights w_ij, node strengths s_i=sum_j w_ij, and total edge weight m=(1/2)sum_ij w_ij, let P_ir in [0,1] be the soft membership of node i in group r, with sum_r P_ir=1. Define the soft internal weight ell_r=(1/2)sum_ij w_ij P_ir P_jr, soft volume v_r=sum_i s_i P_ir, and relative volume x_r=v_r/(2m). The cluster's null-adjusted persistence is NAP_r=2 ell_r/v_r-v_r/(2m), where the first term measures its internal-weight fraction and the second term is its configuration-model null expectation. The paper's interpolation is Q_alpha=sum_r NAP_r x_r^alpha. At alpha=1, Q_alpha=sum_r[ell_r/m-x_r^2], which is weighted modularity; at alpha=0 it is the sum of NAP values. Optimize L_total=L_task-lambda Q_alpha, optionally with a weak assignment entropy term.
Implementation notes
Integrate this at the node-to-cluster assignment tensor in a graph pooling GNN, for example after a GAT or GCN encoder and before DiffPool-style coarsening. The assignment head outputs logits Z in R^(n x R); compute P=softmax(Z, dim=1). For every graph in the minibatch, obtain its weighted adjacency matrix W, strengths s_i=sum_j w_ij, and total strength 2m=sum_i s_i. Compute V=P^T s, and compute the vector of internal weights with sparse matrix multiplication: L=(1/2)diag(P^T W P). Set X=V/(2m+epsilon), NAP=2L/(V+epsilon)-X, and Q=sum_r NAP_r X_r^alpha. Minimize task loss minus lambda times Q; use tau sum P log(P+epsilon) only as a weak entropy penalty if assignments remain diffuse. The paper's mathematics supplies the volume weighting and interpolation; no theorem-dependent quantity needs estimating. First run a small experiment with a two-layer GCN plus DiffPool on Cora, Citeseer, or synthetic planted-partition graphs. Compare baseline DiffPool against alpha in {0, 0.25, 0.5, 0.75, 1} and lambda in {1e-3, 1e-2, 1e-1}. Evaluate node classification accuracy, NMI and ARI against planted communities, the number and size distribution of pools, and task loss at equal epochs. Success is higher NMI or ARI without reduced classification accuracy, particularly under heterogeneous community sizes. Also verify numerically that alpha=1 agrees with a standard modularity auxiliary loss.
Verification
This idea has not been verified yet.
Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.
Artifacts
Artifacts unavailable.