Is Distance Matrix Enough for Geometric Deep Learning?

Zian Li, Xiyuan Wang, Yinan Huang, Muhan Zhang

TL;DR

This paper answers a fundamental question in geometric deep learning: is a simple pairwise distance matrix enough to capture complex 3D geometry? By introducing $k$-DisGNNs—expressive graph neural networks based on the Weisfeiler-Leman hierarchy—the authors prove that pure distance information is theoretically sufficient for universal geometric approximation, bypassing the need for complex equivariant architectures or handcrafted features.

What Problem Does This Paper Address?

Geometric Deep Learning (GDL) is crucial for molecular dynamics, protein folding, and physical simulations. Traditionally, models take 3D coordinates as input and use complex, computationally heavy equivariant neural networks (like those based on spherical harmonics) or manually engineered features (like angles and dihedral angles) to ensure the model respects physical symmetries (rotation, translation).

A simpler alternative is to use the pairwise Euclidean distance matrix, which is naturally invariant to these transformations. However, standard message-passing networks using distances (Vanilla DisGNNs) are geometrically incomplete—they can fail to distinguish between different 3D shapes that share identical distance profiles. This paper investigates whether this is a fundamental limitation of distance matrices or just a limitation of standard message-passing architectures, and seeks to design a theoretically complete distance-based framework.

Methods

The authors propose $k$-DisGNNs, a framework that lifts distance-based GNNs to higher-order expressiveness using the $k$-Weisfeiler-Leman ($k$-WL) graph isomorphism testing hierarchy. Instead of passing messages between single nodes, $k$-DisGNNs operate on $k$-tuples of nodes.

They introduce three variants:

  1. $k$-DisGNN: Based on the standard $k$-WL test, initializing $k$-tuples with their internal distance matrices.
  2. $k$-F-DisGNN: Based on the Folklore WL ($k$-FWL) test, which offers higher expressive power for the same tuple size.
  3. $k$-E-DisGNN: A novel variant that explicitly maintains and updates edge representations between tuples during message passing, allowing the model to be aware of how far a tuple is from its neighbors.

Datasets

The models were evaluated on three widely used benchmarks:

  • MD17: A dataset containing molecular dynamics simulations of small organic molecules (e.g., aspirin, ethanol, toluene) used to predict energy and atomic forces.
  • Revised MD17: A re-computed version of MD17 with higher data quality and a lower noise floor.
  • QM9: A dataset of ~134k stable small organic molecules with 19 chemical/physical regression targets (e.g., dipole moment, HOMO/LUMO energies).

Key Insights and Ideas

  • Symmetric Counterexamples: The authors show exactly why vanilla distance GNNs fail by constructing new, highly symmetric counterexample graphs (sampled from regular polyhedrons like icosahedrons and dodecahedrons) that have identical pairwise distance distributions but completely different 3D structures.
A pair of non-congruent geometric graphs that cannot be distinguished by Vanilla DisGNN
  • Unifying Existing Models: They prove that $k$-DisGNNs naturally subsume popular, highly tailored geometric models. Specifically, 2-E/F-DisGNN can implement DimeNet (which uses angles), and 3-E/F-DisGNN can implement GemNet (which uses dihedral angles).
High-order geometric information contained in the distance matrix of k-tuples
  • Bridging GRL and GDL: The paper establishes a profound connection showing that powerful models from traditional Graph Representation Learning (GRL) can be directly applied to 3D Geometric Deep Learning (GDL) simply by treating the distance matrix as an edge-weighted complete graph.
  • Universal Approximation: They prove that $k$-DisGNNs are universal function approximators from geometric graphs to scalars when $k \ge 2$, and to vectors when $k \ge 3$.

Key Results

  • MD17 & Revised MD17: $k$-DisGNNs achieved state-of-the-art results on force prediction, outperforming complex equivariant models like GNN-LF and TorchMD. On the original MD17, 2-F-DisGNN and 3-E-DisGNN achieved the best performance on 8 out of 16 targets and second-best on the rest.
  • Efficiency: The 2-F-DisGNN model demonstrated significantly better training/inference speed and memory efficiency compared to DimeNet and GemNet. For instance, on Aspirin, 2-F-DisGNN took 234ms/66ms (train/inference) vs. GemNet's 556ms/182ms, while using less than half the GPU memory.
  • QM9: 2-F-DisGNN outperformed DimeNet on 11 out of 12 targets, showing an average improvement of 14.27%.

Limitations and Future Work

  • Computational Complexity: Operating on $k$-tuples introduces high computational overhead. A complete distance graph requires $O(n^k)$ time complexity and $O(n^2)$ space complexity, which becomes intractable for large geometric graphs like proteins.
  • Future Directions: The authors suggest balancing theoretical universality with practical tractability by introducing distance cutoffs (local clustering) or leveraging sparse but highly expressive GRL variants like subgraph GNNs.

Summary updated

BibTeX
@inproceedings{li2023is,
  author = {Zian Li and Xiyuan Wang and Yinan Huang and Muhan Zhang},
  title = {{Is Distance Matrix Enough for Geometric Deep Learning?}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=QwQ5HhhSNo},
}
Figure