Papers
Topics
Authors
Recent
Search
2000 character limit reached

GSINA Framework: Graph Sinkhorn Attention

Updated 7 February 2026
  • GSINA is an optimal transport-based framework that extracts invariant subgraphs by balancing sparsity, softness, and differentiability for robust graph learning.
  • It formulates the extraction as a cardinality-constrained optimal transport problem solved by the entropic Sinkhorn algorithm to enable a differentiable, soft, and sparse attention mechanism.
  • Empirical results demonstrate that GSINA improves graph and node-level tasks, boosting classification accuracy by up to 10% and ROC-AUC by 1–2 points on various benchmarks.

Graph Sinkhorn Attention (GSINA) is an Optimal Transport-based attention framework designed for extracting invariant subgraphs in Graph Invariant Learning (GIL) settings. GSINA addresses the challenge of out-of-distribution (OOD) generalization in graph learning by selecting subgraphs whose relationship to predicted labels remains stable across multiple, unseen environments. The framework formulates subgraph extraction as a cardinality-constrained Optimal Transport problem, solved efficiently using the entropic Sinkhorn algorithm, yielding a fully differentiable, soft, and sparse attention mechanism for graph neural networks (GNNs) (Ding et al., 2024).

1. Motivation and Problem Definition

GSINA is developed in the context of Graph Invariant Learning, where the goal is to construct predictors that minimize the worst-case risk across multiple unknown environments. Consider independent samples (Gie,Yie)(G_i^e, Y_i^e) for unlabeled environment ee; the objective is to find

f∗=arg⁡min⁡f  max⁡e  E(G,Y)∼Ge[ℓ(f(G),Y)]f^* = \arg\min_{f}\;\max_{e}\;\mathbb{E}_{(G,Y)\sim\mathcal{G}^e}[\ell(f(G),Y)]

Since environment labels ee are unobserved, GIL approaches extract an invariant subgraph GS⊆GG_S \subseteq G whose relationship to YY is presumed stable under distributional shifts. The subgraph extraction process focuses on discarding spurious or environment-specific graph structure, retaining only invariant, label-relevant nodes and edges (Ding et al., 2024).

2. Design Principles for Invariant Subgraph Extraction

GSINA is derived from three essential design principles for subgraph extractors:

  • Sparsity: The selected subgraph should be small, retaining few nodes and edges to ensure that non-invariant and noisy graph components are filtered out.
  • Softness: Instead of hard selections (such as top-kk edges), the framework assigns continuous attention weights αeE\alpha^E_e in [0,1][0,1] to each edge, ensuring an enlarged solution space and preserving differentiability.
  • Differentiability: End-to-end differentiability is necessary so that both the subgraph mask and the predictor can be optimized jointly via gradient-based algorithms.

GSINA contrasts with earlier approaches: Information Bottleneck-based (IB) methods (e.g., GSAT) are soft and differentiable but lack enforced sparsity; top-kk methods (e.g., CIGA) ensure sparsity but use hard, non-differentiable selection. GSINA unifies sparsity, softness, and differentiability.

3. Methodology: Graph Sinkhorn Attention

The GSINA framework uses an Optimal Transport abstraction to implement a soft, sparse, and fully differentiable top-ee0 edge selection mechanism:

Edge Scoring

  • Node representations ee1 are generated via a lightweight GNN (ee2).
  • Each edge ee3 is assigned a score ee4.

OT Formulation

  • With ee5 total edges, the objective is to allocate ee6 (invariant mass) to the highest-scoring edges.
  • Define the cost matrix ee7 as:

ee8

where ee9 introduces Gumbel noise (f∗=arg⁡min⁡f  max⁡e  E(G,Y)∼Ge[ℓ(f(G),Y)]f^* = \arg\min_{f}\;\max_{e}\;\mathbb{E}_{(G,Y)\sim\mathcal{G}^e}[\ell(f(G),Y)]0, f∗=arg⁡min⁡f  max⁡e  E(G,Y)∼Ge[ℓ(f(G),Y)]f^* = \arg\min_{f}\;\max_{e}\;\mathbb{E}_{(G,Y)\sim\mathcal{G}^e}[\ell(f(G),Y)]1 during training).

  • Marginals are set as f∗=arg⁡min⁡f  max⁡e  E(G,Y)∼Ge[ℓ(f(G),Y)]f^* = \arg\min_{f}\;\max_{e}\;\mathbb{E}_{(G,Y)\sim\mathcal{G}^e}[\ell(f(G),Y)]2 and f∗=arg⁡min⁡f  max⁡e  E(G,Y)∼Ge[ℓ(f(G),Y)]f^* = \arg\min_{f}\;\max_{e}\;\mathbb{E}_{(G,Y)\sim\mathcal{G}^e}[\ell(f(G),Y)]3.
  • The optimal transport plan f∗=arg⁡min⁡f  max⁡e  E(G,Y)∼Ge[ℓ(f(G),Y)]f^* = \arg\min_{f}\;\max_{e}\;\mathbb{E}_{(G,Y)\sim\mathcal{G}^e}[\ell(f(G),Y)]4 solves:

f∗=arg⁡min⁡f  max⁡e  E(G,Y)∼Ge[ℓ(f(G),Y)]f^* = \arg\min_{f}\;\max_{e}\;\mathbb{E}_{(G,Y)\sim\mathcal{G}^e}[\ell(f(G),Y)]5

subject to f∗=arg⁡min⁡f  max⁡e  E(G,Y)∼Ge[ℓ(f(G),Y)]f^* = \arg\min_{f}\;\max_{e}\;\mathbb{E}_{(G,Y)\sim\mathcal{G}^e}[\ell(f(G),Y)]6, f∗=arg⁡min⁡f  max⁡e  E(G,Y)∼Ge[ℓ(f(G),Y)]f^* = \arg\min_{f}\;\max_{e}\;\mathbb{E}_{(G,Y)\sim\mathcal{G}^e}[\ell(f(G),Y)]7, with f∗=arg⁡min⁡f  max⁡e  E(G,Y)∼Ge[ℓ(f(G),Y)]f^* = \arg\min_{f}\;\max_{e}\;\mathbb{E}_{(G,Y)\sim\mathcal{G}^e}[\ell(f(G),Y)]8 and entropy regularization f∗=arg⁡min⁡f  max⁡e  E(G,Y)∼Ge[ℓ(f(G),Y)]f^* = \arg\min_{f}\;\max_{e}\;\mathbb{E}_{(G,Y)\sim\mathcal{G}^e}[\ell(f(G),Y)]9 controlling softness.

Sinkhorn Normalization

  • Initialize ee0; iteratively normalize rows/columns to match marginals (10 iterations typical) using:

ee1

This produces an approximate solution ee2.

Extracting Attention Weights

  • The first row of ee3 yields edge attention: ee4.
  • Node attention is computed by aggregating incident edge attention, e.g., ee5.

4. Integration with Graph Neural Networks

GSINA functions as a modular attention layer positioned between the GNN feature extractor and the final predictor:

  • Message Passing: Per GNN layer ee6, messages from neighbors ee7 to node ee8 are modulated by ee9:

GS⊆GG_S \subseteq G0

  • Readout: After GS⊆GG_S \subseteq G1 layers, node features are aggregated by node attention:

GS⊆GG_S \subseteq G2

with final prediction GS⊆GG_S \subseteq G3.

  • Training: End-to-end optimization is performed by backpropagating through all GSINA operations, including the Sinkhorn normalization.

5. Hyperparameters and Regularization

Several hyperparameters control the operation and inductive bias of GSINA:

Parameter Description Typical Range
GS⊆GG_S \subseteq G4 Entropy regularization; higher yields smoother attention GS⊆GG_S \subseteq G5, tune
GS⊆GG_S \subseteq G6 Fraction of total edge mass for invariant subgraph GS⊆GG_S \subseteq G7
GS⊆GG_S \subseteq G8 Gumbel noise scaling for exploration during training GS⊆GG_S \subseteq G9 (train)

Smaller YY0 approaches hard (binary) selection, while larger YY1 yields softer masks. Gumbel noise (YY2) is applied during training to escape poor local minima. In practice, YY3 and YY4 in YY5 work effectively when chosen via validation (Ding et al., 2024).

6. Empirical Results and Ablation Studies

GSINA achieves state-of-the-art results on both graph-level and node-level OOD benchmarks:

  • Graph-level tasks: On synthetic Spurious-Motif (YY6), MNIST-75sp, Graph-SST2, OGBG-MolHIV, and additional molecular datasets, GSINA (with GIN or PNA backbones) surpasses other GIL methods. Notably, it outperforms GSAT by up to YY7 classification accuracy on Spurious-Motif and improves ROC-AUC by YY8–YY9 points on molecular datasets, using metrics such as ACC and ROC-AUC.
  • Node-level tasks: On datasets such as Cora, Amazon-Photo, Twitch, Facebook-100, Elliptic, and OGB-ArXiv, GSINA yields substantial gains. For instance, GSINA improves upon ERM and matches or exceeds EERM in most situations (e.g., kk0 ACC on Cora).

Ablation experiments indicate that omitting either Gumbel noise or node attention decreases performance by kk1–kk2 ACC on Spurious-Motif, demonstrating the criticality of both softness and multi-level attention.

7. Analysis, Limitations, and Future Directions

The superior generalization of GSINA is attributed to its unique balance of sparsity (removing spurious substructure), softness (enabling a rich solution space and stable gradients), and full differentiability (jointly optimizing masks and predictions). However, sensitivity to kk3 selection exists, and its OT-based top-kk4 formulation may underperform information bottleneck approaches on certain interpretability metrics relying on hard, binary subgraph extraction. Future work includes integrating explicit connectivity or completeness constraints, learning kk5 or kk6 jointly, and extending the framework for causal invariance discovery at node and edge levels (Ding et al., 2024).

In summary, GSINA advances GIL by introducing an OT-based attention model that is simultaneously sparse, soft, and differentiable, enabling robust and interpretable OOD generalization across diverse graph learning tasks.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to GSINA Framework.