Permutation Invariant Representations with Applications to Graph Deep Learning

Radu V. Balan, Naveed Haghani, Maneesh SingharXiv 2022

Abstract

This paper presents primarily two Euclidean embeddings of the quotient space generated by matrices that are identified modulo arbitrary row permutations. The original application is in deep learning on graphs where the learning task is invariant to node relabeling. Two embedding schemes are introduced, one based on sorting and the other based on algebras of multivariate polynomials. While both embeddings exhibit a computational complexity exponential in problem size, the sorting based embedding is globally bi-Lipschitz and admits a low dimensional target space. Additionally, an almost everywhere injective scheme can be implemented with minimal redundancy and low computational cost. In turn, this proves that almost any classifier can be implemented with an arbitrary small loss of performance. Numerical experiments are carried out on two data sets, a chemical compound data set (QM9) and a proteins data set (PROTEINS).

Introduction

In graph deep learning, data is typically represented as a matrix where each row corresponds to a node. However, graphs lack a canonical node ordering. If the nodes are relabeled, the rows of the matrix are permuted, yet the underlying graph structure remains unchanged. To handle this, machine learning models must be permutation invariant.

The challenge lies in mapping these "shufflable" matrices into a fixed-size Euclidean vector space—suitable for neural networks—while satisfying three critical properties:

  1. Injectivity: Distinct graphs must map to distinct representations to avoid information loss.
  2. Stability (bi-Lipschitz): Small perturbations in the input graph should result in proportionally small changes in the representation.
  3. Euclidean Output: The representation must be a standard vector.

While common techniques like sum or max pooling are invariant, they often fail the injectivity test. This paper explores two mathematical frameworks to achieve these goals.

Methodology

Algebraic Embedding

The first approach treats the rows of a matrix as roots of a multivariate polynomial. By calculating the coefficients of these polynomials—utilizing Vieta’s formulas and Newton-Girard identities—the resulting representation is inherently invariant to the order of the rows. Although mathematically rigorous and injective, the authors demonstrate that this method lacks global stability. Specifically, it is not bi-Lipschitz because polynomial coefficients can fluctuate wildly with minor changes to the input values.

Sorting-based Embedding

The core contribution of this work is a stable sorting-based embedding. The process involves three stages:

  1. Linear Projection: The input matrix $X$ is multiplied by a "key" matrix $A$.
  2. Sorting: The elements of each resulting column are sorted independently.
  3. Dimension Reduction: A linear map compresses the sorted values into a lower-dimensional vector.

The theoretical breakthrough is the proof that if the key matrix $A$ is a "full spark frame," the resulting embedding is globally bi-Lipschitz. Unlike previous sorting methods (e.g., SortPooling) which were often discontinuous, this approach introduces necessary redundancy through the key matrix to ensure both uniqueness and stability.

Experimental Results

The authors evaluated the sorting-based "ordering" method against standard benchmarks, including sum-pooling, set-2-set, and data augmentation.

QM9: Graph Regression

The QM9 dataset consists of approximately 134,000 molecules. The task is to predict the electron energy gap ($Δ\epsilon$). The sorting-based method achieved a Mean Absolute Error (MAE) of 0.155 eV (at $d=100$), outperforming both kernel-based methods and sum-pooling. It performed competitively with data augmentation, which is significantly more computationally expensive.

PROTEINS: Graph Classification

This dataset contains 1,113 proteins classified as enzymes or non-enzymes. The experiments highlighted the importance of architectural invariance. While "identity" methods (which assume a fixed order) failed when node order was shuffled during testing, the sorting-based embedding remained perfectly stable. It achieved high training accuracy (up to 97.5%) with a lower computational footprint than training on augmented datasets.

Discussion and Key Insights

A significant finding is the existence of a "universal key" matrix. The authors prove that a properly structured (even random) matrix can serve as a key for almost any input, suggesting that the sorting parameters do not necessarily need to be learned. This provides a mathematical alternative to data augmentation, allowing models to achieve permutation invariance by design rather than through exhaustive training on shuffled data.

Limitations and Future Work

Despite its theoretical strengths, the construction of a truly "universal" key involves complexity that scales exponentially with the number of nodes ($n!$). In practice, smaller keys are used, but the trade-off between key size and injectivity warrants further study. Additionally, while the current model uses zero-padding for varying graph sizes, future iterations could explore more dynamic handling of node counts and the integration of these stable sorting layers directly into the message-passing phases of Graph Neural Networks (GNNs).

Summary updated

BibTeX
@misc{balan2022permutation,
  author = {Radu V. Balan and Naveed Haghani and Maneesh Singh},
  title = {{Permutation Invariant Representations with Applications to Graph Deep Learning}},
  year = {2022},
  eprint = {2203.07546},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.07546},
}
Figure