Skip to main content
Back

Peking University's OCN Fixes Graph AI's Blind Spot, Beating Top Models by 7.7%

OCN from Peking University fixes two hidden flaws in higher-order common neighbors, beating the strongest GNN baselines by 7.7% on standard link prediction benchmarks

Pro

  • OCN from Peking University fixes two core flaws in higher-order common neighbor features for link prediction, beating the strongest baselines by an average of 7.7%.
  • Redundancy fix: Gram-Schmidt orthogonalization makes CN1, CN2, etc. carry independent information instead of repeating each other.
  • Over-smoothing fix: Path-based normalization down-weights hub nodes that appear in too many walks, keeping link representations distinct.
  • Biggest gains on large graphs: OCN scores 97.42 on ogbl-ddi (vs. 84.11 for NCNC) and 74.87 on ogbl-ppa (OCNP variant), outperforming even GraphGPT.
  • Scalable: MPNN runs once for all links; the faster OCNP variant replaces Gram-Schmidt with polynomial filters for lower compute overhead.
  • Code is available at github.com/qingpingmo/OCN; paper at arxiv.org/abs/2505.19719.

Link prediction -- the task of figuring out which edges are missing from a graph -- sits at the heart of recommendation systems, drug discovery, and protein interaction modeling. The dominant approach for years has been to count common neighbors (CNs): if two nodes share many mutual connections, they are probably linked. Modern GNNs have extended this idea to higher-order common neighbors, looking two, three, or more hops away. The problem is that nobody had properly fixed a pair of structural bugs that make those higher-order signals actively harmful. A new paper from Peking University does exactly that.

Researchers Juntong Wang, Xiyuan Wang, and Muhan Zhang published a paper introducing Orthogonal Common Neighbor (OCN), a method that surgically repairs the two failure modes of higher-order CNs and achieves state-of-the-art results across seven standard benchmarks, outperforming the previous best model by an average of 7.7%. Code is available on GitHub.

Why higher-order neighbors keep failing

The intuition behind higher-order CNs is sound: if two people share not just mutual friends but also mutual friends-of-friends, that is a stronger signal of connection. But in practice, plugging higher-order CNs into existing models often hurts performance. The authors identify exactly why.

  • Redundancy. A node that is a direct common neighbor of a pair (i, j) is almost certainly also reachable via a 2-hop or 3-hop walk. This means CN1, CN2, and CN3 are highly correlated -- they are essentially saying the same thing in slightly different ways. The authors measure this with correlation matrices and find the overlap grows dramatically with order.
  • Over-smoothing. As you look further out, more and more nodes qualify as k-hop common neighbors for more and more pairs. At high enough orders, nearly every node pair shares the same set of distant neighbors, making all link representations look identical -- the graph equivalent of washing out all the signal.

The prior state-of-the-art model, NCN/NCNC, explicitly found that adding higher-order CNs degraded performance and caused out-of-memory errors on large graphs. OCN explains why and fixes both problems.

Heatmap showing increasing correlation between higher-order common neighbor matrices

Two fixes, one elegant model

OCN applies two complementary techniques before feeding CN features into the network.

Coefficient Orthogonalization tackles redundancy. The key insight is that each CNk can be represented as a vector in Rn (one entry per node, counting how many k-hop walks through that node connect the pair). These vectors are highly correlated across orders. OCN applies the Gram-Schmidt process -- a standard linear algebra technique that removes the component of one vector that lies along another -- to make CN1, CN2, etc. mutually independent. The result is called OCNk: each order now carries genuinely new information.

Running Gram-Schmidt over an entire graph is expensive, so the authors borrow a trick from batch normalization: they maintain a running average of inner products across mini-batches, which converges to the global orthogonalization as training progresses. For an even faster variant, they replace Gram-Schmidt with polynomial filters (Chebyshev, Jacobi, etc.) that approximate orthogonality in the spectral domain -- this is the OCNP variant.

Path-based Normalization tackles over-smoothing. The fix is to divide each node's contribution by the number of k-hop walks it participates in across the whole graph. Nodes that appear in many walks (high-degree hubs) get down-weighted; rare, niche connections get amplified. The authors prove theoretically that without this normalization, adding higher-order CNs provides no tightening of the latent-space distance bound between node pairs -- meaning they genuinely add no information. With normalization, each additional order strictly tightens the bound.

Interestingly, when k=1, this normalization degenerates exactly to Resource Allocation (RA), a classical link prediction heuristic from 2009 -- giving the new method a satisfying theoretical grounding in existing work.

Architecture diagram of OCN showing MPNN processing followed by OCN attention mechanism

Putting it together

The final OCN model follows the MPNN-then-SF (structural feature) paradigm introduced by NCN. The MPNN runs once on the full graph to produce node embeddings. Then for each candidate link (i, j), the prediction is:

# Conceptual OCN prediction for link (i, j)
z_ij = (h_i * h_j)  # element-wise product of MPNN embeddings
      + alpha_1 * (OCN_1 @ h)  # orthogonalized 1-hop CNs weighted by node embeddings
      + alpha_2 * (OCN_2 @ h)  # orthogonalized 2-hop CNs weighted by node embeddings
prob = sigmoid(MLP(z_ij))

The learnable scalars alpha_1 and alpha_2 let the model balance the contribution of each order. In practice, alpha_1 is always learned to be larger than alpha_2, confirming the expected inductive bias that closer neighbors matter more. The authors found that going beyond 2-hop CNs introduced instability without benefit, so OCN uses K=2 in all experiments.

Benchmark results

OCN outperforms all baselines on all datasets except Citeseer and Citation2, where it is only 0.6% behind NCNC. The gains are largest on the hardest, largest-scale graphs:

  • ogbl-ddi (drug-drug interaction): OCN scores 97.42 HR@20 vs. NCNC's 84.11 -- a massive +13 point jump.
  • ogbl-ppa (protein-protein association): OCNP scores 74.87 HR@100 vs. NCNC's 61.42, and even beats the large-scale GraphGPT model.
  • ogbl-collab: OCN scores 72.43 HR@50 vs. NCNC's 66.61.
  • Across the seven datasets, OCN improves by an average of 7.2% over NCN and by an average of 12.4% over BUDDY.

The ablation study is particularly revealing. Removing orthogonalization (OCN-Orth) causes performance to collapse on ogbl-ppa from 69.79 to 18.39. Removing normalization (OCN-normalizedCN) drops ogbl-citation2 from 88.57 to 86.33. Both components are necessary, and their combination is what produces the gains.

Scalability and practical limits

Both OCN and NCN exhibit similar computational overhead, as they only need to run the MPNN model once. SEAL, by contrast, must re-run the MPNN for every single candidate link, making it far slower at inference time. OCNP is faster than OCN on both time and memory, making it the practical choice for large graphs.

There are real constraints to keep in mind:

  • OCN works best on large-scale graphs. On small graphs like Cora and Citeseer, existing models are nearly saturated and gains are modest.
  • Going beyond 2-hop CNs causes training instability and OOM errors on large datasets -- the paper recommends sticking with K=2.
  • OCN requires slightly more GPU memory than NCN due to the orthogonalization bookkeeping.
  • Performance is sensitive to the choice of MPNN backbone: GCN works best in most experiments, while GraphSAGE and MAX aggregation underperform.

What this unlocks

The real contribution here is not just a better number on a leaderboard. OCN is strictly more expressive than Graph Autoencoder (GAE), CN, RA, AA, and is not less expressive than Neo-GNN, BUDDY, and NCN. More concretely, OCN can distinguish link pairs that every prior method -- including NCN -- treats as identical, because it leverages 2-hop CN structure that those methods either ignore or corrupt with redundancy.

For practitioners, this matters most in domains where graph structure is rich and higher-order relationships are meaningful: protein interaction networks, citation graphs, large-scale recommendation systems, and knowledge graph completion. The open-source implementation is built on PyTorch Geometric and runs on a single GPU, making it accessible for most production workflows.