GECC-Gated Loop-Aware Message Passing
Implementation & benchmark of arXiv:2608.09397 — Ensemble-level loopy message passing with generalized-edge closure for percolation
Source paper: Ensemble-level loopy message passing with generalized-edge closure for percolation arXiv:2608.09397 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Construct order-n generalized edges from intersections of local ego-subgraphs and use their overlap statistics to correct ordinary one-hop aggregation. A learned gate should activate the correction only when local generalized-edge closure is high, because dense but internally inconsistent overlaps are precisely where naive loop corrections can become unreliable.
Formulas
Mathematical statement
For a node of degree k, let \(\Gamma_k^{(n)}\) be its order-n local subgraph, and for adjacent nodes of degrees k and d define the generalized edge \(E_{kd}^{(n)}=\Gamma_k^{(n)}\cap\Gamma_d^{(n)}\). At n=0 this contains only the direct edge, recovering ordinary message passing; increasing n adds shared neighbors and short-loop structure. For each edge \((u,v)\), let \(S_u^{(n)}\) and \(S_v^{(n)}\) be the extracted node-centered subgraphs and let \(E_{uv}^{(n)}=S_u^{(n)}\cap S_v^{(n)}\). Define an implementable closure-consistency estimator \(C_{uv}^{(n)}=2|E_{uv}^{(n)}|/(|S_u^{(n)}|+|S_v^{(n)}|+\epsilon)\), where \(\epsilon>0\) avoids division by zero. Aggregate standard messages \(m_{uv}\) and generalized-edge messages \(g_{uv}\), then combine them using \(\alpha_{uv}=\sigma(a_0+a_1 C_{uv}^{(n)}+a_2 r_{uv})\), where \(r_{uv}=|E_{uv}^{(n)}|/(|S_u^{(n)}||S_v^{(n)}|+\epsilon)\), \(\sigma\) is the logistic function, and \(a_0,a_1,a_2\) are learned scalars. The resulting update is a local approximation to ensemble-level loopy message passing, with C serving as a GECC-like reliability signal.
Implementation notes
1. Integration point: insert this module as a replacement for a standard GCN, GraphSAGE, or GAT layer. For each training graph, precompute radius-n ego-subgraphs for every node; start with n=1, where the intersection can be represented by common neighbors and edge endpoints. For every edge (u,v), store the node IDs in the intersection and compute its size, the two ego-subgraph sizes, and the two closure features C and r. 2. Pseudocode: for each edge (u,v), form I=intersection(S[u],S[v]); compute C=2*len(I)/(len(S[u])+len(S[v])+eps) and r=len(I)/(len(S[u])*len(S[v])+eps); compute alpha=sigmoid(a0+a1*C+a2*r); compute ordinary message W1*h[v] and overlap message W2*mean(h[w] for w in I), using a zero overlap message when I is empty; add (1-alpha)*ordinary + alpha*overlap to u's update. 3. Computed quantities are exact local graph statistics; only W0,W1,W2 and a0,a1,a2 are learned. Estimate reliability empirically by binning edges or graphs by mean C and measuring validation error against a baseline GNN. 4. First cheap experiment: train GCN, GraphSAGE, and this model on Cora, Citeseer, and synthetic stochastic block models augmented with triangles. Use identical depth, hidden width, and optimizer. Compare performance separately for low- and high-closure graphs and ablate C/r gating. The quantitative prediction is that the gated correction gives its largest gain when mean C is high and improves least when C is low; if high closure is internally inconsistent, the gate should learn a non-monotone dependence on C through r. Also test oversmoothing by measuring pairwise cosine similarity across layers: on high-C graphs, the loop-aware model should delay the depth at which cosine similarity exceeds 0.95, while the ungated correction should become unstable or lose accuracy when the learned gate is forced to one. A useful falsification criterion is that validation gain and reduced oversmoothing must not correlate with C after controlling for average degree and triangle count.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: No measurable effect
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built an exact n=1 ego-intersection implementation with closure/r features, learned GECC gating, a baseline GCN, and a reproducible toy experiment. The mechanism checks passed: closure slope matched the predicted 1/(k+1) within 6.2e-14, the alpha=0.5 transition was observed at C=0.29 versus predicted 0.286, monotonic gating held, and update interpolation slope matched exactly. In the toy node-classification run, GECC also improved test error from 0.167 to 0.042, though this is only a small synthetic result.
- Agent confidence
- 8/10
- Baseline
- Toy graph: all-node error 0.0833, test error 0.1667
- Idea
- Toy graph: all-node error 0.0208, test error 0.0417; mean directed-edge C=0.4453; closure slope observed 0.142857 vs predicted 0.142857; gate transition observed C=0.29 vs predicted 0.286; update slope observed -1.500000 vs predicted -1.500000
Limitations: Only n=1 intersections and one small synthetic graph were tested; no Cora/Citeseer, multi-layer oversmoothing study, low/high-closure controlled sweep, ablation, FLOP/speed comparison, or repeated random seeds was run. The implementation uses Python-level edge loops and is an MVP rather than an optimized training layer.
How to run: python3 gecc_demo.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.09397)
No significant difference vs. the tuned baseline (0.0006 metric points, p=0.816, wins 0 / 0 paired seeds).
- Benchmark
- Custom:gecc_loop_graph
- Model
- GraphNet
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0.0987
- Effect (Δ)
- 0.0006 (n/a; negative = idea better)
- Wins
- 0 / 0 paired seeds
- p-value
- 0.816 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
Only the custom graph track was tested because the built-in tracks lack graph message-passing structure. The experiment used a small fixed graph and one layer; larger graphs, deeper oversmoothing, external graph datasets, and speed comparisons were not tested.
How to run: python3 gecc_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Built and evaluated a custom triangle-rich graph classification track with matched standard and GECC message-passing systems. The trained-model signature confirmed increasing gate activation with closure, but GECC error was 0.098750 versus baseline 0.098125; paired delta was +0.000625 with permutation p=0.816. This is no measurable effect, not a win.
- Baseline
- mean test error 0.098125, best lr 0.003
- Idea
- mean test error 0.098750, best lr 0.003; paired delta +0.000625, p=0.816
Benchmark result
No significant difference vs. the tuned baseline (0.0006 metric points, p=0.816, wins 0 / 0 paired seeds).
- Benchmark
- Custom:gecc_loop_graph
- Model
- GraphNet
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0.0987
- Effect (Δ)
- 0.0006 (n/a; negative = idea better)
- Wins
- 0 / 0 paired seeds
- p-value
- 0.816 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
Only the custom graph track was tested because the built-in tracks lack graph message-passing structure. The experiment used a small fixed graph and one layer; larger graphs, deeper oversmoothing, external graph datasets, and speed comparisons were not tested.
How to run: python3 gecc_bench.py
Artifacts
- bench_report.json 3.5 KB View Raw
- gecc_bench.py 7.3 KB View Raw
- gecc_demo.py 6.9 KB View Raw
- report.md 1.4 KB View
- report_bench_2026-09-01T115728.md 2.3 KB View
- results.json 1.4 KB View Raw