DIFFormer: Scalable (Graph) Transformers Induced by Energy Constrained Diffusion

Qitian Wu, Chenxiao Yang, Wen-Long Zhao, Yixuan He, David Wipf +1 more
2/12/2026

No official code found. Best implementation: qitianwu/DIFFormer (312 stars, PyTorch, last commit 2025-07-02).

Abstract

Real-world data generation often involves complex inter-dependencies among instances, violating the IID-data hypothesis of standard learning paradigms and posing a challenge for uncovering the geometric structures for learning desired instance representations. To this end, we introduce an energy constrained diffusion model which encodes a batch of instances from a dataset into evolutionary states that progressively incorporate other instances' information by their interactions. The diffusion process is constrained by descent criteria w.r.t.~a principled energy function that characterizes the global consistency of instance representations over latent structures. We provide rigorous theory that implies closed-form optimal estimates for the pairwise diffusion strength among arbitrary instance pairs, which gives rise to a new class of neural encoders, dubbed as DIFFormer (diffusion-based Transformers), with two instantiations: a simple version with linear complexity for prohibitive instance numbers, and an advanced version for learning complex structures. Experiments highlight the wide applicability of our model as a general-purpose encoder backbone with superior performance in various tasks, such as node classification on large graphs, semi-supervised image/text classification, and spatial-temporal dynamics prediction.

View on arXivView PDF

Code Implementations(1)

qitianwu/DIFFormerCommunity74%
PyTorch

The official implementation for ICLR23 spotlight paper "DIFFormer: Scalable (Graph) Transformers Induced by Energy Constrained Diffusion"

31228Shell, PythonMar 1, 20231 years ago
attentiondiffusiondiffusion-equationgeometric-deep-learninggraph-neural-networks+11 more

Similar Papers

Cite this paper

@article{wu2026difformer,
  title  = {DIFFormer: Scalable (Graph) Transformers Induced by Energy Constrained Diffusion},
  author = {Qitian Wu and Chenxiao Yang and Wen-Long Zhao and Yixuan He and David Wipf and Junchi Yan},
  year   = {2026},
  eprint = {2301.09474},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/pdf/2301.09474},
  journal = {ICLR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2301.09474.svg)](https://codeofpaper.com/paper/2301.09474)

Discussion