TL;DR
RankGNN is a new framework that combines the structural processing power of Graph Neural Networks (GNNs) with pair-wise "Learning to Rank" (LtR) techniques. By focusing on relative preferences between graphs rather than absolute regression scores, RankGNN achieves superior and more robust ranking performance on complex structured data like molecular candidates.
What Problem Does This Paper Address?
Ranking is a fundamental task in machine learning, appearing in everything from search engines to recommender systems. However, most "Learning to Rank" (LtR) research assumes that objects are represented as simple feature vectors. In many high-impact fields, like drug discovery, the objects of interest are structured: they are graphs where nodes represent atoms and edges represent chemical bonds.
Traditionally, researchers have tackled graph ranking in one of two ways:
- Manual Feature Engineering: Converting graphs into vectors using domain-specific knowledge (e.g., chemical fingerprints), which is labor-intensive and may miss subtle structural patterns.
- Point-wise Regression: Using a GNN to predict a single numerical value (like solubility) for each graph and then sorting them.
The authors argue that point-wise regression is suboptimal for ranking. Regression models try to minimize absolute error, making them highly sensitive to outliers. In ranking, we don't care if a model predicts a solubility of 5.0 or 500.0, as long as it correctly identifies that Molecule A is more soluble than Molecule B.
Methods
The authors introduce RankGNN, a family of models that integrates GNNs into a pair-wise ranking pipeline. The architecture consists of two main stages:
- Graph Embedding: A GNN (such as GCN, GIN, or a higher-order 2-WL-GNN) processes a graph and produces a fixed-length feature vector (embedding).
- Comparator Network: This network takes two graph embeddings and predicts which one is "preferred." The authors tested two specific architectures:
- DirectRanker: A model that implicitly learns a utility function and guarantees mathematical properties like transitivity (if A > B and B > C, then A > C).
- CmpNN (Comparative Neural Network): A more flexible model that can learn non-transitive preferences, which might be useful for modeling human voting or subjective preferences.
A key technical contribution is an efficient batching strategy. In a pair-wise setting, the same graph might appear in many different pairs. To avoid redundant GNN computations, the authors batch all unique graphs once, generate their embeddings, and then use an "Embedding Lookup" to form the pairs for the comparator network.
Datasets
Because dedicated graph ranking benchmarks are scarce, the authors converted five established graph regression datasets into ranking tasks by treating the regression targets as "utility" values:
- TRIANGLES: A synthetic dataset where the goal is to rank graphs by the number of 3-cliques (triangles) they contain.
- OGB-molesol, -mollipo, -molfreesolv: Molecular graphs from the Open Graph Benchmark, ranked by solubility and lipophilicity.
- ZINC: A large-scale dataset of 250,000 molecular structures.
Key Insights and Ideas
- Loss Function Superiority: The pair-wise rank loss, which directly penalizes "inversions" (wrongly ordered pairs), proved much better suited for these tasks than the standard Mean Squared Error (MSE) loss used in regression.
- Smoothing Outliers: The authors found that point-wise regression models often struggle with "abrupt" changes in target values at the extremes of a dataset. RankGNN effectively "stretches" these utilities into a linear, monotonic curve, making the model more robust to outliers.
- Structural Resolution: The synthetic TRIANGLES task highlighted a limitation of standard GNNs. Basic models like GCN and GIN cannot "see" cycles and thus failed to rank graphs by triangle counts. Only the higher-order 2-WL-GNN achieved perfect ranking, proving that the choice of GNN backbone is critical for structural tasks.
- Transitivity vs. Efficiency: While CmpNN is more expressive, DirectRanker is more efficient for inference. Because DirectRanker learns a utility score, you can sort $N$ objects in $O(N \log N)$ time, whereas non-transitive models like CmpNN might require more complex rank aggregation.
Key Results
- Outperformance: RankGNN variants either significantly outperformed or matched the performance of point-wise GNN regression across all datasets.
- Consistency: On the TRIANGLES dataset, the pair-wise 2-WL-GNN achieved a perfect Kendall’s $\tau_B$ score of 1.000, performing more consistently across retraining iterations than its point-wise counterpart.
- Significant Gains: The most notable improvements were seen on the ZINC and OGB-mollipo datasets, where the pair-wise approach handled the underlying data distribution much more effectively than regression.
Limitations and Future Work
The authors acknowledge that using regression data as a proxy for ranking is a limitation. Future work should focus on creating real-world graph ranking benchmarks, such as drug screening data where the "ground truth" comes from human expert preferences rather than physical measurements.
Additionally, they suggest exploring list-wise approaches, which look at entire sets of objects at once to capture context-dependent preferences. Finally, while they touched on kernel-based methods (like RankSVM), they found them computationally too expensive for large graph datasets, leaving a gap for more efficient kernel approximations in the future.
Summary updated