Dataset Condensation Atlas

Method · Gradient matching

DosCond

Condensing Graphs via One-Step Gradient Matching

Wei Jin, Xianfeng Tang, Haoming Jiang, Zheng Li, Danqing Zhang, Jiliang Tang, Bing Yin

KDD 2022 · first public 2022-06-15 · arXiv 2206.07746

paper ↗code ↗catalogued✓ full text read

In one paragraph

Proposes DosCond, a one-step gradient-matching scheme for graph condensation that models the discrete graph structure probabilistically and matches gradients for a single step instead of unrolling multi-step training; reports 90% graph-size reduction while retaining up to 98% of original performance, about 15x faster than multi-step gradient matching.

Explained

What came before

DD (bi-level meta-learning) and DC (Zhao et al. 2021, gradient matching with multi-step unrolled inner training) work on continuous images. GCond had extended gradient matching to graphs for node classification but keeps the full multi-step bi-level inner loop and produces a weighted, real-valued adjacency matrix that must be stored in float and thresholded post hoc.

The problem

Two obstacles block a direct port of image gradient matching to graphs: (1) the adjacency matrix is discrete (0/1), and no existing condensation method outputs binary values; (2) the multi-step bi-level inner loop used by DC/GCond has complexity that scales with the product of inner and outer iterations, which is especially costly for graphs because the GNN forward pass itself scales with the number of edges (quadratic potential in condensed node count per graph).

The idea

Model each entry of the condensed adjacency matrix as a Bernoulli random variable (parameterized by a learnable logit, made differentiable via the binary-concrete/Gumbel-softmax reparameterization), and replace multi-step bi-level gradient matching with "one-step" matching that only aligns gradients at the initial random weights $\theta_0$, discarding the training trajectory — theoretically justified by a generalization bound showing the loss gap is controlled by the initial-step gradient distance plus a norm term.

How it works

Optimizes condensed node features $\mathbf{X}'$ and adjacency logits $\Omega$ (with $\mathbf{A}'_{ij}= \sigma((\log\alpha-\log(1-\alpha)+\Omega_{ij})/\tau)$, $\alpha\sim\mathrm{Uniform}(0,1)$, annealed temperature $\tau$) by minimizing, per class, a one-step gradient-matching loss $D(\nabla_\theta \ell(f_{\theta_0} (\mathbf{A}'(\Omega),\mathbf{X}'),\mathcal{Y}'), \nabla_\theta \ell(f_{\theta_0}(\mathcal{T}),\mathcal{Y}))$ averaged over $K_1{=}1000$ sampled random initializations $\theta_0$, plus a sparsity regularizer on $\sigma(\Omega)$ and (for sum-pooling GNNs only) a second regularizer derived from the generalization bound. A 3-layer GCN is the network in the loop; labels $\mathcal{Y}'$ are fixed hard labels. For node classification the same one-step loss is substituted directly into GCond's framework.

Evidence

Table 1 (graph classification, GCN evaluator, hard labels): ogbg-molbace at 2 graphs/0.2% budget reaches 0.657 ROC-AUC vs. 0.714 whole-dataset (92% retained); ogbg-molhiv at 0.3% budget reaches 0.731 vs. 0.757 whole (96.5% retained); DD dataset at 0.2%/2.1%/10.6% budgets retains 89%/93%/98% of whole-dataset accuracy. Table 3 (node classification, ported into GCond's protocol): DosCond matches GCond within ~2 points on Cora/Citeseer/Pubmed/Arxiv/Flickr while running up to 40x faster per 100 epochs (e.g. Cora 3.5s vs. 75.9s). Table 2: on CIFAR10 (50 graphs/class) DosCond takes ~5 minutes to reach the accuracy DosCond-Bi (the bi-level ablation) takes 75 minutes to reach — 6.7% of the training cost. Key ablation: DCG (a DC variant that only learns features on randomly-selected, i.e. non-learned, structure) trails DosCond by a large margin on graph classification, showing that learning discrete structure jointly with features (not just features) is necessary to preserve classification-relevant information.

Limitations

Performance on CIFAR10-as-graph is comparatively weak, attributed to its more complex topology needing more synthetic parameters than the tested budgets provide; datasets are still small-to-modest scale (molecular graphs, TU datasets, one 1,109-graph e-commerce set) with no ImageNet-scale or web-scale graph tested; the one-step approximation is justified by a bound that assumes the largest gradient gap occurs at initialization, an assumption not directly verified beyond the two loss-term-scale plots; and the paper's own future work flags a lack of interpretability for the learned discrete structures.

Written by the atlas from the paper's full text. Check the paper for exact numbers.

Where it sits

Design choices

What is storedgraph-structure
Labelshard
Prior / networks usedrandom-networks
Optimization regimesingle-level

Builds on

Built on by

Abstract (verbatim from arXiv)

As training deep learning models on large dataset takes a lot of time and resources, it is desired to construct a small synthetic dataset with which we can train deep learning models sufficiently. There are recent works that have explored solutions on condensing image datasets through complex bi-level optimization. For instance, dataset condensation (DC) matches network gradients w.r.t. large-real data and small-synthetic data, where the network weights are optimized for multiple steps at each outer iteration. However, existing approaches have their inherent limitations: (1) they are not directly applicable to graphs where the data is discrete; and (2) the condensation process is computationally expensive due to the involved nested optimization. To bridge the gap, we investigate efficient dataset condensation tailored for graph datasets where we model the discrete graph structure as a probabilistic model. We further propose a one-step gradient matching scheme, which performs gradient matching for only one single step without training the network weights. Our theoretical analysis shows this strategy can generate synthetic graphs that lead to lower classification loss on real graphs. Extensive experiments on various graph datasets demonstrate the effectiveness and efficiency of the proposed method. In particular, we are able to reduce the dataset size by 90% while approximating up to 98% of the original performance and our method is significantly faster than multi-step gradient matching (e.g. 15x in CIFAR10 for synthesizing 500 graphs). Code is available at \url{https://github.com/amazon-research/DosCond}.

BibTeX (generated; prefer the venue's official entry)
@article{jin2022condensing,
  title   = {Condensing Graphs via One-Step Gradient Matching},
  author  = {Wei Jin and Xianfeng Tang and Haoming Jiang and Zheng Li and Danqing Zhang and Jiliang Tang and Bing Yin},
  journal = {KDD 2022},
  year    = {2022}
}

Nearby in Gradient matching

2025-11

Linear Gradient Matching — Dataset Distillation for Pre-Trained Self-Supervised Vision Models

George Cazenavette, Antonio Torralba, Vincent Sitzmann · NeurIPS 2025notablePre-training & transferpaper ↗code ↗

2025-05

PRISM — PRISM: Video Dataset Condensation with Progressive Refinement and Insertion for Sparse Motion

Jaehyun Choi, Jiwan Hur, Gyojin Han et al. · CVPR 2026notableVideopaper ↗

2025-02

GRADMM — Synthetic Text Generation for Training Large Language Models via Gradient Matching

Dang Nguyen, Zeman Li, Mohammadhossein Bateni et al. · ICML 2025notableTextpaper ↗code ↗

2024-04

Distilled Datamodel with Reverse Gradient Matching

Jingwen Ye, Ruonan Yu, Songhua Liu et al. · CVPR 2024notablepaper ↗

2023-12

Static-dynamic video DD — Dancing with Still Images: Video Distillation via Static-Dynamic Disentanglement

Ziyu Wang, Yue Xu, Cewu Lu et al. · CVPR 2024coreVideopaper ↗code ↗