Table of Contents
Fetching ...

Ising on the Graph: Task-specific Graph Subsampling via the Ising Model

Maria Bånkestad, Jennifer R. Andersson, Sebastian Mair, Jens Sjölund

TL;DR

The paper introduces a task-specific graph subsampling framework that casts graph reduction as sampling from an Ising model defined on graph nodes or edges, with a graph neural network parameterizing the external magnetic field $h_\theta$. By training $h_\theta$ end-to-end via a REINFORCE Leave-One-Out gradient estimator, it handles non-differentiable downstream losses and enables end-to-end optimization for diverse tasks. The authors demonstrate the method across image segmentation, graph explainability, 3D mesh sparsification, and sparse approximate matrix inverses, achieving improved task performance and efficient sampling compared to baselines. This approach offers a flexible, task-aware mechanism for reducing graph complexity while preserving downstream utility, with practical implications for speed and interpretability in complex systems.

Abstract

Reducing a graph while preserving its overall properties is an important problem with many applications. Typically, reduction approaches either remove edges (sparsification) or merge nodes (coarsening) in an unsupervised way with no specific downstream task in mind. In this paper, we present an approach for subsampling graph structures using an Ising model defined on either the nodes or edges and learning the external magnetic field of the Ising model using a graph neural network. Our approach is task-specific as it can learn how to reduce a graph for a specific downstream task in an end-to-end fashion without requiring a differentiable loss function for the task. We showcase the versatility of our approach on four distinct applications: image segmentation, explainability for graph classification, 3D shape sparsification, and sparse approximate matrix inverse determination.

Ising on the Graph: Task-specific Graph Subsampling via the Ising Model

TL;DR

The paper introduces a task-specific graph subsampling framework that casts graph reduction as sampling from an Ising model defined on graph nodes or edges, with a graph neural network parameterizing the external magnetic field . By training end-to-end via a REINFORCE Leave-One-Out gradient estimator, it handles non-differentiable downstream losses and enables end-to-end optimization for diverse tasks. The authors demonstrate the method across image segmentation, graph explainability, 3D mesh sparsification, and sparse approximate matrix inverses, achieving improved task performance and efficient sampling compared to baselines. This approach offers a flexible, task-aware mechanism for reducing graph complexity while preserving downstream utility, with practical implications for speed and interpretability in complex systems.

Abstract

Reducing a graph while preserving its overall properties is an important problem with many applications. Typically, reduction approaches either remove edges (sparsification) or merge nodes (coarsening) in an unsupervised way with no specific downstream task in mind. In this paper, we present an approach for subsampling graph structures using an Ising model defined on either the nodes or edges and learning the external magnetic field of the Ising model using a graph neural network. Our approach is task-specific as it can learn how to reduce a graph for a specific downstream task in an end-to-end fashion without requiring a differentiable loss function for the task. We showcase the versatility of our approach on four distinct applications: image segmentation, explainability for graph classification, 3D shape sparsification, and sparse approximate matrix inverse determination.
Paper Structure (28 sections, 26 equations, 22 figures, 5 tables, 1 algorithm)

This paper contains 28 sections, 26 equations, 22 figures, 5 tables, 1 algorithm.

Figures (22)

  • Figure 1: The external magnetic field $h$ (left) can vary spatially and influences the sampling probability relative to its strength. The sign of the coupling constant $J$ determines whether neighboring spins attract (top right) or repel each other (bottom right).
  • Figure 2: Comparison of a U-Net trained with a cross-entropy loss against an Ising model with a learned magnetic field. From left to right are the image, the Ising model magnetic field, the U-Net output (the logits), the Ising model prediction, the U-Net prediction, and the true segmentation mask.
  • Figure 3: Left: Quantitative evaluation of IGExplainer and IGExplainerS using a synthetic dataset BA-2motifs and a real-world dataset Mutag. We report the graph explanation accuracy (GEA) and the fidelity score; higher is better for both scores. The theoretical limit of GEA is 0.43 for Mutag and 1 for BA-2motifs. Right: Qualitative analysis of the explanations generated by IGExplainer with the magnetic field $h$, the sample average, the top-$k$ nodes, and the truth. See Appendix \ref{['app:baslines_exp']} for baselines.
  • Figure 4: Left: Mean and standard deviation of the test vertex-to-mesh distance from the five-fold cross-validation of the four datasets. Here, lower is better. For an explanation of the other methods and the results as a table, see Appendix \ref{['app:mesh_sparse']}. Middle: Learned magnetic field of an object. Right: Sampled vertices using the Ising model with a learned magnetic field. Black vertices are retained in the coarser mesh and are more important for the overall shape preservation (see the ears and nose).
  • Figure 5: Sparsity patterns of $A$, its inverse $A^{-1}$, our sparse approximate inverse (50% elements, Setting 3), and predicted magnetic field $h$ for two test matrices (non-zeros in white).
  • ...and 17 more figures