\section{Introduction}\label{sec:intro}

Real-world data are generated from a convoluted interactive process whose underlying physical principles are often unknown.
Such a nature violates the common hypothesis of standard representation learning paradigms assuming that data are IID sampled. The challenge, however, is that due to the absence of prior knowledge about ground-truth data generation, it can be practically prohibitive to build feasible methodology for uncovering data dependencies, despite the acknowledged significance. To address this issue, prior works, e.g., \cite{pointcloud-19,LDS-icml19,jiang2019glcn,Bayesstruct-aaai19}, consider encoding the potential interactions between instance pairs, but this requires sufficient degrees of freedom that significantly increases learning difficulty from limited labels~\citep{fatemi2021slaps} and hinders the scalability to large systems~\citep{IDGL-neurips20}.

Turning to a simpler problem setting where putative instance relations are instantiated as an observed graph, remarkable progress has been made in designing expressive architectures such as graph neural networks (GNNs)~\citep{scarselli2008gnnearly,GCN-vallina,GAT,SGC-icml19,gcnii-icml20,RWLS-icml21} for harnessing inter-connections between instances as a geometric prior~\citep{geometriclearning-2017}.
However, the observed relations can be incomplete/noisy, due to error-prone data collection, or generated by an artificial construction independent from downstream targets. The potential inconsistency between observation and the underlying data geometry would presumably elicit systematic bias between structured representation of graph-based learning and true data dependencies. While a plausible remedy is to learn more useful structures from the data, this unfortunately brings the previously-mentioned obstacles to the fore

To resolve the dilemma, we propose a novel general-purpose encoder framework that uncovers data dependencies from observations (a dataset of partially labeled instances), proceeding via two-fold inspiration from physics as illustrated in Fig.~\ref{fig:model}. Our model is defined through feed-forward continuous dynamics (i.e., a PDE) involving all the instances of a dataset as locations on Riemannian manifolds with \emph{latent} structures, upon which the features of instances act as heat flowing over the underlying geometry~\citep{hamzi2021learning}. Such a diffusion model serves an important \emph{inductive bias} for leveraging global information from other instances to obtain more informative representations. Its major advantage lies in the flexibility for the \emph{diffusivity} function, i.e., a measure of the rate at which information spreads~\citep{rosenberg1997laplacian}: we allow for feature propagation between arbitrary instance pairs at each layer, and adaptively navigate this process by pairwise connectivity weights.
Moreover, for guiding the instance representations towards some ideal constraints of internal consistency, we introduce a principled energy function that enforces layer-wise \emph{regularization} on the evolutionary directions. The energy function provides another view (from a macroscopic standpoint) into the desired instance representations with low energy that are produced, i.e., soliciting a steady state that gives rise to informed predictions on unlabeled data

\begin{figure}[tb!]
			\centering
			\hspace{5pt}
			\includegraphics[width=0.85\textwidth]{figure/model.pdf}
	    \vspace{-5pt}
		\caption{\looseness=-1 An illustration of the general idea behind \textsc{DIFFormer}\xspace which takes a whole dataset (or a batch) of instances as input and encodes them into hidden states through a diffusion process aimed at minimizing a regularized energy. This design allows feature propagation among arbitrary instance pairs at each layer with optimal inter-connecting structures for informed prediction on each instance.}
		\label{fig:model}
	\vspace{-20pt}
\end{figure}

As a justification for the tractability of above general methodology, our theory reveals the underlying equivalence between finite-difference iterations of the diffusion process and unfolding the minimization dynamics for an associated regularized energy. This result further suggests a closed-form optimal solution for the diffusivity function that updates instance representations by the ones of all the other instances towards giving a rigorous decrease of the global energy. Based on this, we also show that the energy constrained diffusion model can serve as a principled perspective for unifying popular models like MLP, GCN and GAT which can be viewed as special cases of our framework.

On top of the theory, we propose a new class of neural encoders, Diffusion-based Transformers (\textsc{DIFFormer}\xspace), and its two practical instantiations: one is a simple version with $\mathcal O(N)$ complexity ($N$ for instance number) for computing all-pair interactions among instances; the other is a more expressive version that can learn complex latent structures. We empirically demonstrate the success of \textsc{DIFFormer}\xspace on a diverse set of tasks. It outperforms SOTA approaches on semi-supervised node classification benchmarks and performs competitively on large-scale graphs. It also shows promising power for image/text classification with low label rates and predicting spatial-temporal dynamics.

\section{Related Work}\label{sec:related}
\vspace{-5pt}

\textbf{Graph-based Semi-supervised Learning.}
Graph-based SSL~\citep{GCN-vallina} aims to learn from partially labeled data, where instances are treated as nodes and their relations are given by a graph. The observed structure can be leveraged as regularization for learning representations~\citep{belkin2006manireg,weston2012semiemb,Panetoid-icml19} or as an inductive bias of modern GNN architectures~\citep{scarselli2008gnnearly}. However, there frequently exist situations where the observed structure is unavailable or unreliable~\citep{LDS-icml19,jiang2019glcn,Bayesstruct-aaai19,IDGL-neurips20,fatemi2021slaps}, in which case the challenge remains how to uncover the underlying relations. This paper explores a new encoder architecture for discovering data geometry to promote learning through the inter-dependence among instances (either labeled or unlabeled).

\textbf{Neural Diffusion Models.} There are several recent efforts on diffusion-based learning where continuous dynamics serve as an inductive bias for representation learning~\citep{hamzi2021learning}. One category directly solves a continuous process of differential equations~\citep{lagaris1998artificial,chen2018neuralode}, e.g.,~\cite{grand} and its follow-ups~\citep{beltrami,GRAND++} reveal the analogy between the discretization of diffusion process and GNNs' feedforward rules, and devise new (continuous) models on graphs whose training requires PDE-solving tools. Differently, another category is PDE-inspired learning using the diffusion perspective as motivation on top of which new (discrete) graph neural models are designed~\citep{atwood2016diffusion,NetLSD,klicpera2019diffusion,xu2020heat,wang2021dissecting}. Our work leans on the latter and the key originality lies in two aspects. First, we introduce a novel diffusion model whose dynamics are implicitly defined by optimizing a regularized energy. Second, our theory establishes an equivalence between the numerical iterations of diffusion process and unfolding the optimization of the energy, based on which we develop a new class of neural encoders for uncovering latent structures among a layer number of instances.

\textbf{Instance/Node-Level v.s.~Graph-Level Prediction.} To avoid potential mis-interpretations of our work, we remark upfront that our goal is to learn a single latent interaction graph among instances, and this can be generally viewed as an embodiment of \textit{node-level} prediction (NP) tasks widely studied in the graph learning community. This is distinct from \textit{graph-level} prediction (GP) whereby each graph itself generally has a single label to predict and a dataset contains many graph instances. These two problems are typically tackled separately in the literature~\citep{ogb-nips20} with disparate technical considerations.  This is because input instances are inter-dependent in NP (due to the instance interactions involved in the data-generating process), while in GP tasks the instances can be treated as IID samples. Although there exist some recent models considering all-pair feature propagation among the nodes of each graph instance~\citep{pointcloud-19,graphtransformer-2020}, such prior work largely focuses on GP with relatively small graphs.  It therefore remains under-explored how to build an efficient and expressive model for learning node-pair interactions for NP tasks involving latent graphs that can be prohibitively large.

\vspace{-2pt}

\section{Energy Constrained Geometric Diffusion Transformers}\label{sec:model}
\vspace{-2pt}

Consider a set of partially labeled instances $\{\mathbf x_i\}_{i=1}^N$, whose labeled portion is $\{(\mathbf x_j, y_j)\}_{j=1}^M$ (often $M \ll N$). In some cases there exists relational structures that connect
instances as a graph $\mathcal G = (\mathcal V, \mathcal E)$, where the node set $\mathcal V$ contains all the instances and the edge set $\mathcal E=\{e_{ij}\}$ consists of observed relations. Without loss of generality, the main body of this section does \emph{not} assume graph structures as input, but we will later discuss how to trivially incorporate then if/when available.

\vspace{-2pt}

\subsection{Geometric Diffusion Model}
\vspace{-2pt}

The starting point of our model is a diffusion process that treats a dataset of instances as a whole and produces instance representations through information flows characterized by an anisotropic diffusion process, which is inspired by an analogy with heat diffusion on a Riemannian manifold~\citep{rosenberg1997laplacian}. We use a vector-valued function $\mathbf z_i(t): [0, \infty) \rightarrow \mathbb R^d$ to define an instance's state at time $t$ and location $i$. The anisotropic diffusion process describes the evolution of instance states (i.e., representations) via a PDE with boundary conditions~\citep{freidlin1993diffusion,medvedev2014nonlinear}:
\begin{equation}\label{eqn-diffuse}
    \frac{\partial \mathbf Z(t)}{\partial t} = \nabla^*\left(\mathbf S(\mathbf{Z}(t), t) \odot \nabla \mathbf Z(t)\right), ~~~ \mbox{s. t.} ~~ \mathbf Z(0) = [\mathbf x_i]_{i=1}^N, ~~ t\geq 0,
\end{equation}
where $\mathbf Z(t) = [\mathbf z_i(t)]_{i=1}^N \in \mathbb R^{N\times d}$, $\odot$ denotes the Hadamard product, and the function $\mathbf S(\mathbf Z(t), t): \mathbb R^{N\times d} \times [0, \infty) \rightarrow [0, 1]^{N\times N}$ defines the \emph{diffusivity} coefficient controlling the diffusion strength between any pair at time $t$. The diffusivity is specified to be dependent on instances' states.
The gradient operator $\nabla$ measures the difference between source and target states, i.e., $(\nabla \mathbf Z(t))_{ij} = \mathbf z_j(t) - \mathbf z_i(t)$, and the divergence operator $\nabla^*$ sums up information flows at a point, i.e., $(\nabla^*)_i = \sum_{j=1}^N \mathbf S_{ij}(\mathbf Z(t), t) \left(\nabla \mathbf Z(t)\right)_{ij}$. Note that both operators are defined over a discrete space consisting of $N$ locations. The physical implication of Eq.~\ref{eqn-diffuse} is that the temporal change of heat at location $i$ equals to
the heat flux that spatially enters into the point.
Eq.~\ref{eqn-diffuse} can be explicitly written as
\begin{equation}\label{eqn-diffuse2}
    \frac{\partial \mathbf z_i(t)}{\partial t} = \sum_{j=1}^N \mathbf S_{ij}(\mathbf Z(t), t) (\mathbf z_j(t) - \mathbf z_i(t)).
\end{equation}
Such a diffusion process can serve as an inductive bias that guides the model to use other instances' information at every layer for learning informative instance representations.
We can use numerical methods to solve the continuous dynamics in Eq.~\ref{eqn-diffuse2}, e.g., the explicit Euler scheme involving finite differences with step size $\tau$, which after some re-arranging gives:
\begin{equation}\label{eqn-diffuse-iter}
    \mathbf z_i^{(k+1)} = \left (1 - \tau \sum_{j=1}^N \mathbf S_{ij}^{(k)} \right ) \mathbf z_i^{(k)} + \tau \sum_{j=1}^N \mathbf S_{ij}^{(k)} \mathbf z_j^{(k)}.
\end{equation}
The numerical iteration can stably converge for $\tau\in(0, 1)$. We can adopt the state after a finite number $K$ of propagation steps  and use it for final predictions, i.e., $\hat y_i = \mbox{MLP}(\mathbf z_i^{(K)})$.

\looseness=-1\textbf{\emph{Remark.}} The diffusivity coefficient in Eq.~\ref{eqn-diffuse} is a measure of the rate at which heat can spread over the space~\citep{rosenberg1997laplacian}. Particularly in Eq.~\ref{eqn-diffuse2}, $\mathbf S(\mathbf Z(t), t)$ determines how information flows over instances and the evolutionary direction of instance states. Much flexibility remains for its specification. For example, a basic choice is to fix $\mathbf S(\mathbf Z(t), t)$ as an identity matrix which constrains the feature propagation to self-loops and the model degrades to an MLP that treats all the instances independently. One could also specify $\mathbf S(\mathbf Z(t), t)$ as the observed graph structure if available in some scenarios. In such a case, however, the information flows are restricted by neighboring nodes in a graph. An ideal case could be to allow $\mathbf S(\mathbf Z(t), t)$ to have non-zero values for arbitrary $(i, j)$ and evolve with time, i.e., the instance states at each layer can efficiently and adaptively propagate to all the others.

\subsection{Diffusion Constrained by a Layer-wise Energy}
As mentioned previously, the crux is how to define a proper diffusivity function to induce a desired diffusion process that can maximize the information utility and accord with some inherent consistency. Since we have no prior knowledge for the explicit form or the inner structure of $\mathbf S^{(k)}$, we consider the diffusivity as a time-dependent latent variable and introduce an \emph{energy function} that measures the presumed quality of instance states at a given step $k$:
\begin{equation}\label{eqn-energy}
    E(\mathbf Z, k; \delta) = \|\mathbf Z - \mathbf Z^{(k)}\|_{\mathcal F}^2 + \lambda\sum_{i,j} \delta(\|\mathbf z_i - \mathbf z_j\|_2^2),
\end{equation}
where $\delta:\mathbb R^+ \rightarrow \mathbb R$ is defined as a function that is \emph{non-decreasing} and \emph{concave} on a particular interval of our interest, and promotes robustness against large differences~\citep{RWLS-icml21} among any pair of instances. Eq.~\ref{eqn-energy} assigns each state in $\mathbb R^d$ with an energy scalar which can be leveraged to regularize the updated states (towards lower energy desired). The weight $\lambda$ trades two effects: 1) for each instance $i$, the states not far from the current one $\mathbf z_i^{(k)}$ have low energy; 2) for all instances, the smaller differences their states have, the lower energy is produced.

\textbf{\emph{Remark.}} Eq.~\ref{eqn-energy} can essentially be seen as a robust version of the energy introduced by \cite{globallocal-2003}, inheriting the spirit of regularizing the global and local consistency of representations.
``Robust" here particularly implies that the $\delta$ adds uncertainty to each pair of the instances and could \emph{implicitly} filter the information of noisy links (potentially reflected by proximity in the latent space).

\textbf{Energy Constrained Diffusion.} The diffusion process describes the \emph{microscopic} behavior of instance states through evolution, while the energy function provides a \emph{macroscopic} view for quantifying the consistency. In general, we expect that the final states could yield a low energy, which suggests that the physical system arrives at a steady point wherein the yielded instance representations have absorbed enough global information under a certain guiding principle.
Thereby, we unify two schools of thoughts into a new diffusive system where instance states would evolve towards producing lower energy, e.g., by finding a valid diffusivity function.
Formally, we aim to find a series of $\mathbf S^{(k)}$'s whose dynamics and constraints are given by
\begin{equation}\label{eqn-diffuse-appx}
    \begin{split}
    &\mathbf z_i^{(k+1)} = \left (1 - \tau \sum_{j=1}^N \mathbf S_{ij}^{(k)} \right ) \mathbf z_i^{(k)} + \tau \sum_{j=1}^N \mathbf S_{ij}^{(k)} \mathbf z_j^{(k)} \\
    &\mbox{s. t.}~~\mathbf z_i^{(0)} = \mathbf x_i, \quad E(\mathbf Z^{(k+1)}, k; \delta) \leq E(\mathbf Z^{(k)}, k-1; \delta), \quad k\geq 1.
    \end{split}
\end{equation}
The formulation induces a new class of geometric flows on latent manifolds whose dynamics are \emph{implicitly} defined by optimizing
a time-varying energy function (see Fig.~\ref{fig:model} for an illustration).

\subsection{Tractability of Solving Diffusion Process with Energy Minimization}

Unfortunately, Eq.~\ref{eqn-diffuse-appx} is hard to solve since we need to infer the value for a series of coupled $\mathbf S^{(k)}$'s that need to satisfy $K$ inequalities by the energy minimization constraint.
The key result of this paper is the following theorem that reveals the underlying connection between the geometric diffusion model and iterative minimization of the energy, which further suggests an explicit closed-form solution for $\mathbf S^{(k)}$ based on the current states $\mathbf Z^{(k)}$ that yields a rigorous decrease of the energy.
\begin{theorem}\label{thm-main}
    For any regularized energy defined by Eq.~\ref{eqn-energy} with a given $\lambda$, there exists $0<\tau<1$ such that the diffusion process of Eq.~\ref{eqn-diffuse-iter} with the diffusivity between pair $(i,j)$ at the $k$-th step given by
    \begin{equation}\label{eqn-optimal-diffuse}
        \mathbf{\hat S}_{ij}^{(k)} = \frac{\omega_{ij}^{(k)}}{\sum_{l=1}^N \omega_{il}^{(k)}}, \quad \omega_{ij}^{(k)} = \left. \frac{\partial \delta(z^2)}{\partial z^2} \right |_{z^2 = \|\mathbf z_i^{(k)} - \mathbf z_j^{(k)}\|_2^2},
    \end{equation}
    yields a descent step on the energy, i.e., $E(\mathbf Z^{(k+1)}, k; \delta) \leq E(\mathbf Z^{(k)}, k-1; \delta)$ for any $k\geq 1$.
\end{theorem}

Theorem~\ref{thm-main} suggests the existence for the optimal diffusivity in the form of a function over the $l_2$ distance between states at the current step, i.e., $\|\mathbf z_i^{(k)} - \mathbf z_j^{(k)}\|_2$. The result enables us to unfold the implicit process and compute $\mathbf S^{(k)}$ in a feed-forward way from the initial states. We thus arrive at a new family of neural model architectures with layer-wise computation specified by:
{\small
\vspace{-5pt}
\begin{center}
\fcolorbox{black}{gray!10}{\parbox{0.97\linewidth}{
\vspace{-5pt}
\begin{equation}\label{eqn-model}
    \begin{split}
        & \mbox{Diffusivity Inference:} \quad \mathbf {\hat S}_{ij}^{(k)} = \frac{f(\|\mathbf z_i^{(k)} - \mathbf z_j^{(k)}\|_2^2)}{\sum_{l=1}^N f(\|\mathbf z_i^{(k)} - \mathbf z_l^{(k)}\|_2^2)}, \quad 1 \leq i, j \leq N,\\
        & \mbox{State Updating:} \quad \mathbf z_i^{(k+1)} = \underbrace{\left (1 - \tau \sum_{j=1}^N \mathbf {\hat S}_{ij}^{(k)} \right ) \mathbf z_i^{(k)} }_{\mbox{state conservation}} + \underbrace{\tau \sum_{j=1}^N \mathbf {\hat S}_{ij}^{(k)} \mathbf z_j^{(k)} }_{\mbox{state propagation}}, \quad 1 \leq i \leq N.
    \end{split}
\end{equation}
\vspace{-10pt}
}
}
\end{center} }
\vspace{-5pt}
\textbf{\emph{Remark.}} The choice of function $f$ in above formulation is not arbitrary, but needs to be a non-negative and decreasing function of $z^2$, so that the associated $\delta$ in Eq.~\ref{eqn-energy} is guaranteed to be non-decreasing and concave w.r.t. $z^2$. Critically though, there remains much room for us to properly design the specific $f$,
so as to provide adequate capacity and scalability. Also, in our model presented by Eq.~\ref{eqn-model} we only have one hyper-parameter $\tau$ in practice, noting that the weight $\lambda$ in the regularized energy is implicitly determined through $\tau$ by Theorem \ref{thm-main}, which reduces the cost of hyper-parameter searching.

\vspace{-2pt}

\section{Instantiations of \textsc{DIFFormer}\xspace}\label{sec:inst}
\vspace{-2pt}

\subsection{Model Implementation}
\vspace{-2pt}

We next go into model instantiations based on our theory. We introduce two specified $f$'s as practical versions of our model whose detailed implementations are given in Appendix~\ref{appx-alg} with PyTorch-style pseudo code.
First, because $\|\mathbf z_i - \mathbf z_j\|_2^2 = \|\mathbf z_i\|_2^2 + \|\mathbf z_j\|_2^2 - 2\mathbf z_i^\top \mathbf z_j$, we can convert $f(\|\mathbf z_i - \mathbf z_j\|_2^2)$ into the form $g(\mathbf z_i^\top \mathbf z_j)$ using a change of variables on the condition that $\|\mathbf z_i\|_2$ remains constant. And we add layer normalization to each layer to loosely enforce such a property in practice.

\textbf{Simple Diffusivity Model.} A straightforward design is to adopt the linear function $g(x) = 1+x$:
\begin{equation}\label{eqn-S1}
    \omega_{ij}^{(k)} = f(\|\tilde{\mathbf z}_i^{(k)} - \tilde{\mathbf z}_j^{(k)}\|_2^2; \mathbf W_Q^{(k)}, \mathbf W_K^{(k)}) = 1 + (\mathbf W_Q^{(k)} \mathbf z_i^{(k)} )^\top
    (\mathbf W_K^{(k)} \mathbf z_j^{(k)} ),
\end{equation}
where $\mathbf W_Q^{(k)}$, $\mathbf W_K^{(k)}$ are learnable weight matrices of the $k$-th layer.  Assuming $\tilde{\mathbf z}_i^{(k)} = \mathbf W_Q^{(k)} \mathbf z_i^{(k)}$, $\tilde{\mathbf z}_j^{(k)} = \mathbf W_K^{(k)} \mathbf z_j^{(k)}$ and $z = \|\tilde{\mathbf z}_i^{(k)} - \tilde{\mathbf z}_j^{(k)}\|_2$, Eq.~\ref{eqn-S1} can be written as $f(z^2) = 2 - \frac{1}{2}z^2$, which yields a non-negative result and is decreasing on the interval $[0, 2]$ where $z^2$ lies after layer normalization.

One scalability concern for the model Eq.~\ref{eqn-model} arises because of the need to compute pairwise diffusivity and propagation for each individual, inducing $\mathcal O(N^2)$ complexity. Remarkably, the simple diffusivity model allows a significant acceleration by noting that the state propagation can be re-arranged via
\begin{equation}
     \sum_{j=1}^N \mathbf S_{ij}^{(k)} \mathbf z_j^{(k)} = \sum_{j=1}^N \frac{1 + (\tilde{\mathbf z}_i^{(k)})^\top \tilde{\mathbf z}_j^{(k)}}{\sum_{l=1}^N\left (1 + (\tilde{\mathbf z}_i^{(k)})^\top \tilde{\mathbf z}_l^{(k)} \right ) } \mathbf z_j^{(k)} = \frac{\sum_{j=1}^N\mathbf z_j^{(k)} + \left (\sum_{j=1}^N \tilde{\mathbf z}_j^{(k)}\cdot  (\mathbf z_j^{(k)})^\top \right ) \cdot \tilde{\mathbf z}_i^{(k)} }{N + (\tilde{\mathbf z}_i^{(k)})^\top \sum_{l=1}^N \tilde{\mathbf z}_l^{(k)}}.
\end{equation}
Note that the two summation terms above can be computed once and shared to every instance $i$, reducing the complexity in each iteration to $\mathcal O(N)$. We call this implementation as \textsc{DIFFormer}\xspace-s.

\textbf{Advanced Diffusivity Model.} The simple model facilitates efficiency/scalability, yet may sacrifice the  capacity for complex latent geometry. We thus propose an advanced version with $g(x) = \frac{1}{1+\exp(-x)}$:
\begin{equation}\label{eqn-S2}
    \omega_{ij}^{(k)} = f(\|\tilde{\mathbf z}_i^{(k)} - \tilde{\mathbf z}_j^{(k)}\|_2^2; \mathbf W_Q^{(k)}, \mathbf W_K^{(k)}) = \frac{1}{1+\exp{\left(- (\mathbf W_Q^{(k)} \mathbf z_i^{(k)} )^\top
    (\mathbf W_K^{(k)} \mathbf z_j^{(k)} ) \right ) }},
\end{equation}
which corresponds with $f(z^2) = \frac{1}{1+e^{z^2/2-1}}$ guaranteeing monotonic decrease and non-negativity. We dub this version as \textsc{DIFFormer}\xspace-a. Appendix~\ref{appx-inst} further compares the two models (i.e., different $f$'s and $\delta$'s) through synthetic results. Real-world empirical comparisons are in Section~\ref{sec:exp}.

\subsection{Model Extensions and Further Discussion}
\textbf{Incorporating Layer-wise Transformations.} Eq.~\ref{eqn-model} does not use feature transformations for each layer. To further improve the representation capacity, we can add such transformations after the updating, i.e., $\mathbf z_i^{(k)} \leftarrow h^{(k)}(\mathbf z_i^{(k)})$ where $h^{(k)}$ can be a fully-connected layer (see Appendix~\ref{appx-alg} for details). In this way, each iteration of the diffusion yields a descent of a particular energy $E(\mathbf Z, k;\delta, h^{(k)}) = \|\mathbf Z - h^{(k)}(\mathbf Z^{(k)})\|_2^2 + \sum_{i,j} \delta(\|\mathbf z_i - \mathbf z_j\|_2^2)$ dependent on $k$.
The trainable transformation $h^{(k)}$ can be optimized w.r.t. the supervised loss to map the instance representations into a proper latent space. Our experiments find that the layer-wise transformation is not necessary for small datasets, but contributes to positive effects for datasets with larger sizes. Furthermore, one can consider non-linear activations in the layer-wise transformation $h^{(k)}$ though we empirically found that using a linear model already performs well. We also note that Theorem~\ref{thm-main} can be extended to hold even when incorporating such a non-linearity in each layer (see Appendix~\ref{appx-non} for detailed discussions).

\textbf{Incorporating Input Graphs.} For the model presented so far, we do \emph{not} assume an input graph for the model formulation. For situations with observed structures as available input, we have $\mathcal G = (\mathcal V, \mathcal E)$ that can be leveraged as a geometric prior. We can thus modify the updating rule as:
\begin{equation}\label{eqn-diffuse-graph}
    \mathbf z_i^{(k+1)} = \left (1 - \frac{\tau}{2} \sum_{j=1}^N \left(\mathbf {\hat S}_{ij}^{(k)} + \tilde{\mathbf A}_{ij} \right ) \right ) \mathbf z_i^{(k)} + \frac{\tau}{2} \sum_{j=1}^N \left (\mathbf {\hat S}_{ij}^{(k)} + \tilde{\mathbf A}_{ij}  \right )\mathbf z_j^{(k)},
\end{equation}
where $\tilde{\mathbf A}_{ij} = \frac{1}{\sqrt{d_id_j}}$ if $(i,j)\in \mathcal E$ and 0 otherwise, and $d_i$ is instance $i$'s degree in $\mathcal G$. The diffusion iteration of Eq.~\ref{eqn-diffuse-graph} is equivalent to minimizing a new energy additionally incorporating a graph-based penalty~\citep{graphkernel}, i.e., $\sum_{(i,j)\in \mathcal{E}} \|\mathbf z_i^{(k)} - \mathbf z_j^{(k)}\|_2^2$ (see Appendix~\ref{appx-inst} for details).

\textbf{Scaling to Large Datasets.} Another advantage of \textsc{DIFFormer}\xspace is the flexibility for mini-batch training. For datasets with prohibitive instance numbers that make it hard for full-batch training on a single GPU, we can naturally partition the dataset into mini-batches and feed one mini-batch for one feed-forward and backward computation. Similar efforts can be applied for parallel acceleration.

\begin{table}[t!]
\centering
\caption{A unified view for MLP, GCN and GAT from our energy-driven geometric diffusion framework regarding
energy function forms, diffusivity specifications and algorithmic complexity. \label{tbl-existing}}
\vspace{-5pt}
\small
    \resizebox{0.99\textwidth}{!}{
\begin{tabular}{@{}c|c|c|c@{}}
\toprule
Models & Energy Function $E(\mathbf Z, k; \delta)$ & Diffusivity $\mathbf S^{(k)}$ & Complexity \\
\midrule
MLP & $\|\mathbf Z - \mathbf Z^{(k)}\|_2^2$ & $\mathbf S^{(k)}_{ij} = \left\{
    \begin{aligned}
         &1, \quad \mbox{if} \; i = j  \\
         &0, \quad otherwise
    \end{aligned}
    \right. $ & $\mathcal O(NKd^2)$ \\
\hline
GCN & $\sum_{(i,j)\in \mathcal E} \|\mathbf z_i - \mathbf z_j\|_2^2$ & $\mathbf S^{(k)}_{ij} = \left\{
    \begin{aligned}
         &\frac{1}{\sqrt{d_id_j}}, \quad \mbox{if} \; (i,j) \in \mathcal E  \\
         &0, \quad otherwise
    \end{aligned}
    \right. $ & $\mathcal O(|\mathcal E|Kd^2)$  \\
\hline
GAT & $\sum_{(i,j)\in \mathcal E} \delta(\|\mathbf z_i - \mathbf z_j\|_2^2)$ & $\mathbf S^{(k)}_{ij} = \left\{
    \begin{aligned}
         &\frac{f(\|\mathbf z_i^{(k)} - \mathbf z_j^{(k)}\|_2^2)}{\sum_{l: (i,l)\in \mathcal E} f(\|\mathbf z_i^{(k)} - \mathbf z_l^{(k)}\|_2^2)}, \quad \mbox{if} \; (i,j) \in \mathcal E  \\
         &0, \quad otherwise
    \end{aligned}
    \right.  $& $\mathcal O(|\mathcal E|Kd^2)$  \\
\hline
\textsc{DIFFormer}\xspace & $\|\mathbf Z - \mathbf Z^{(k)}\|_2^2 + \lambda \sum_{i,j} \delta(\|\mathbf z_i - \mathbf z_j\|_2^2)$ & $\mathbf S^{(k)}_{ij} = \frac{f(\|\mathbf z_i^{(k)} - \mathbf z_j^{(k)}\|_2^2)}{\sum_{l=1}^N f(\|\mathbf z_i^{(k)} - \mathbf z_l^{(k)}\|_2^2)}, \quad 1\leq i,j \leq N$ & $\begin{aligned} &\mbox{\textsc{DIFFormer}\xspace-s}:\quad \mathcal O(NKd^2) \\ &\mbox{\textsc{DIFFormer}\xspace-a}:\quad \mathcal O(N^2Kd^2) \end{aligned}$ \\
\bottomrule
\end{tabular}}
\vspace{-15pt}
\end{table}

\textbf{Connection with Existing Models.} The proposed methodology in fact serves as a general diffusion framework that provides a unifying view whereby some existing models can be seen as special cases of ours. As a non-exhaustive summary and high-level comparison, Table~\ref{tbl-existing} presents the relationships with MLP, GCN and GAT which can be expressed via simplified versions of our principled energy and diffusion models (see more elaboration in Appendix~\ref{appx-connection}).

\section{Experiments}\label{sec:exp}
We apply \textsc{DIFFormer}\xspace to various tasks for evaluation: 1) graph-based node classification where an input graph is given as observation; 2) image and text classification without input graphs; 3) dynamics prediction that requires handling new unseen instances from test data, i.e., inductive learning. In each case, we compare a different (with some overlap) set of competing models that are closely associated with \textsc{DIFFormer}\xspace and speciﬁcally designed for the particular task. Unless otherwise stated, for datasets where input graphs are available, we incorporate them for feature propagation as is defined by Eq.~\ref{eqn-diffuse-graph}. Due to space limit, we defer details of datasets to Appendix~\ref{appx-dataset} and the implementations to Appendix~\ref{appx-implementation}. Also, we provide additional supporting empirical results in Appendix~\ref{appx-results}.

\begin{table}[t]
\centering
\caption{Mean and standard deviation of testing accuracy on node classification (with five different random initializations). All the models are split into groups with a comparison of non-linearity (whether the model requires activation for layer-wise transformations), PDE-solver (whether the model requires PDE-solver for back-propagation) and rewiring (whether to modify the structure).\label{tbl-bench}}
  \vspace{-5pt}
\small
    \resizebox{\textwidth}{!}{
\begin{tabular}{@{}c|c|cccccc@{}}
\toprule
\textbf{Type} & \textbf{Model} & \textbf{Non-linearity} & \textbf{PDE-solver} & \textbf{Rewiring}  & \textbf{Cora} & \textbf{Citeseer} & \textbf{Pubmed}   \\
\midrule
\multirow{3}{*}{Basic models} & MLP & \cmark   & -  & -   & 56.1 $\pm$ 1.6 & 56.7 $\pm$ 1.7 & 69.8 $\pm$ 1.5  \\
& LP & -  & -  & -   & 68.2 & 42.8 & 65.8 \\
& ManiReg & \cmark    & -  & -  & 60.4 $\pm$ 0.8 & 67.2 $\pm$ 1.6 & 71.3 $\pm$ 1.4 \\
\midrule
\multirow{8}{*}{Standard GNNs}
& GCN & \cmark   & -  & -   & 81.5 $\pm$ 1.3  & 71.9 $\pm$ 1.9 & 77.8 $\pm$ 2.9 \\
& GAT & \cmark   & -  & -   & 83.0 $\pm$ 0.7 & 72.5 $\pm$ 0.7 & 79.0 $\pm$ 0.3 \\
& SGC & -  & -  & -   & 81.0 $\pm$ 0.0 & 71.9 $\pm$ 0.1 & 78.9 $\pm$ 0.0 \\
& GCN-$k$NN & \cmark   & -  & \cmark    & 72.2 $\pm$ 1.8 & 56.8 $\pm$ 3.2 & 74.5 $\pm$ 3.2 \\
& GAT-$k$NN & \cmark   & -  & \cmark    & 73.8 $\pm$ 1.7 & 56.4 $\pm$ 3.8 & 75.4 $\pm$ 1.3 \\
& Dense GAT & \cmark   & -  & \cmark    & 78.5 $\pm$ 2.5 & 66.4 $\pm$ 1.5 & 66.4 $\pm$ 1.5 \\
& LDS & \cmark   & -  & \cmark    & \color{brown}\textbf{83.9 $\pm$ 0.6} & \color{brown}\textbf{74.8 $\pm$ 0.3} & out-of-memory \\
& GLCN & \cmark   & -  & \cmark    & 83.1 $\pm$ 0.5 & 72.5 $\pm$ 0.9 & 78.4 $\pm$ 1.5 \\
\midrule
\multirow{6}{*}{Diffusion-based models}
& GRAND-l & -  & \cmark   & -   & 83.6 $\pm$ 1.0 & 73.4 $\pm$ 0.5 & 78.8 $\pm$ 1.7 \\
& GRAND & \cmark   & \cmark   & \cmark    & 83.3 $\pm$ 1.3 & 74.1 $\pm$ 1.7 & 78.1 $\pm$ 2.1 \\
& GRAND++ & \cmark   & \cmark   & \cmark    & 82.2 $\pm$ 1.1 & 73.3 $\pm$ 0.9 & 78.1 $\pm$ 0.9 \\
& GDC & \cmark   & -  & -   & 83.6 $\pm$ 0.2 & 73.4 $\pm$ 0.3 & 78.7 $\pm$ 0.4 \\
& GraphHeat & \cmark   & -  & -  & 83.7 & 72.5 & \color{brown}\textbf{80.5} \\
& DGC-Euler & -  & -  & -   & 83.3 $\pm$ 0.0 & 73.3 $\pm$ 0.1 & 80.3 $\pm$ 0.1 \\
\midrule
\multirow{2}{*}{Ours}
& {\textsc{DIFFormer}\xspace}-s & -  & -  & \cmark    & \color{purple}\textbf{84.7 $\pm$ 0.1} & 73.5 $\pm$ 0.3 & \color{purple}\textbf{81.8 $\pm$ 0.3} \\
& {\textsc{DIFFormer}\xspace}-a & -   & -  & \cmark    & 83.7 $\pm$ 0.6 & \color{purple}\textbf{75.7 $\pm$ 0.3} & \color{brown}\textbf{80.5 $\pm$ 1.2} \\
\bottomrule
\end{tabular}}
\vspace{-5pt}
\end{table}

\subsection{Semi-supervised Node Classification Benchmarks}

We test \textsc{DIFFormer}\xspace on three citation networks \texttt{Cora}, \texttt{Citeseer} and \texttt{Pubmed}. Table~\ref{tbl-bench} reports the testing accuracy. We compare with several sets of baselines linked with our model from different aspects. 1) Basic models: \emph{MLP} and two classical graph-based SSL models Label Propagation (\emph{LP})~\citep{lp-icml2003} and \emph{ManiReg}~\citep{belkin2006manireg}. 2) GNN models: \emph{SGC}~\citep{SGC-icml19}, \emph{GCN}~\citep{GCN-vallina}, \emph{GAT}~\citep{GAT}, their variants \emph{GCN-$k$NN}, \emph{GAT-$k$NN} (operating on $k$NN graphs constructed from input features) and \emph{Dense GAT} (with a densely connected graph replacing the input one), and two strong structure learning models LDS~\citep{LDS-icml19} and GLCN~\citep{glconv-cvpr19}. 3) PDE graph models: the SOTA models \emph{GRAND}~\citep{grand} (with its linear variant GRAND-l) and \emph{GRAND++}~\citep{GRAND++}.
4) Diffusion-inspired GNN models: \emph{GDC}~\citep{klicpera2019diffusion}, \emph{GraphHeat}~\citep{xu2020heat} and a recent work \emph{DGC-Euler}~\citep{wang2021dissecting}. Table~\ref{tbl-bench} shows that \textsc{DIFFormer}\xspace achieves the best results on three datasets with significant improvements. Also, we notice that the simple diffusivity model \textsc{DIFFormer}\xspace-s significantly exceeds the counterparts without non-linearity (SGC, GRAND-l and DGC-Euler) and even comes to the first on \texttt{Cora} and \texttt{Pubmed}. These results suggest that \textsc{DIFFormer}\xspace can serve as a very competitive encoder backbone for node-level prediction that learns inter-instance interactions for generating informative representations and boosting downstream performance.

\subsection{Large-Scale Node Classification Graphs}
We also consider two large-scale graph datasets \texttt{ogbn-Proteins}, a multi-task protein-protein interaction network, and \texttt{Pokec}, a social network.
Table~\ref{tbl-largebench} presents the results. Due to the dataset size (0.13M/1.63M nodes for two graphs) and scalability issues that many of the competitors in Table~\ref{tbl-bench} as well as \textsc{DIFFormer}\xspace-a would potentially experience, we only compare \textsc{DIFFormer}\xspace-s with standard GNNs. In particular, we found GCN/GAT/\textsc{DIFFormer}\xspace-s are still hard for full-graph training on a single V100 GPU with 16GM memory. We thus consider mini-batch training with batch size 10K/100K for \texttt{Proteins}/\texttt{Pokec}.
We found that \textsc{DIFFormer}\xspace outperforms common GNNs by a large margin, which suggests its desired efficacy on large datasets. As mentioned previously, we prioritize the efficacy of \textsc{DIFFormer}\xspace as a general encoder backbone for solving node-level prediction tasks on large graphs. While there are quite a few practical tricks shown to be effective for training GNNs for this purpose, e.g., hop-wise attention~\citep{adadiffusion-2022} or various label re-use strategies, these efforts are largely orthogonal to our contribution here and can be applied to most any model to further boost performance. For further investigation, we supplement more results using different mini-batch sizes for training and study its impact on testing performance in Appendix~\ref{appx-batch}. Furthermore, we compare the training time and memory costs in Appendix~\ref{appx-time} where we found that \textsc{DIFFormer}\xspace-s is about 6 times faster than GAT and 39 times faster than DenseGAT on \texttt{Pokec}, which suggests superior scalability and efficiency of \textsc{DIFFormer}\xspace-s on large graphs.

\subsection{Image and Text Classification with Low Label Rates}

We next conduct experiments on \texttt{CIFAR-10}, \texttt{STL-10} and \texttt{20News-Group} datasets to test \textsc{DIFFormer}\xspace for standard classification tasks with limited label rates.
For \texttt{20News} provided by \cite{pedregosa2011scikit}, we take 10 topics and use words with TF-IDF more than 5 as features.
For \texttt{CIFAR} and \texttt{STL}, two public image datasets, we first use the self-supervised approach SimCLR~\citep{chen2020simple} (that does not use labels for training) to train a ResNet-18 for extracting the feature maps as input features of instances.
These datasets contain no graph structure, so we use $k$NN to construct a graph over input features for GNN competitors and do \emph{not} use input graphs for \textsc{DIFFormer}\xspace.

Table~\ref{tab:image classification} reports the testing accuracy of \textsc{DIFFormer}\xspace and competitors including MLP, ManiReg, GCN-$k$NN, GAT-$k$NN, DenseGAT and GLCN.
Two \textsc{DIFFormer}\xspace models perform much better than MLP in nearly all cases, suggesting the effectiveness of learning the inter-dependence over instances. Besides, \textsc{DIFFormer}\xspace yields large improvements over GCN and GAT which are in some sense limited by the handcrafted graph that leads to sub-optimal propagation. Moreover, \textsc{DIFFormer}\xspace significantly outperforms GLCN, a strong baseline that learns new (static) graph structures, which demonstrates the superiority of our evolving diffusivity that can adapt to different layers.

\begin{figure}[t]
\begin{minipage}{0.33\linewidth}
    \centering
	\captionof{table}{Testing ROC-AUC for \texttt{Proteins} and Accuracy for \texttt{Pokec} on large-scale node classification datasets. $*$ denotes using mini-batch training on a Tesla V100 with 16GB memory. \label{tbl-largebench}}
	\vspace{-6pt}
    \resizebox{0.9\textwidth}{!}{
\begin{tabular}{@{}c|cc@{}}
\toprule
\textbf{Models} & \textbf{Proteins} & \textbf{Pokec}   \\
\midrule
MLP & 72.41 $\pm$ 0.10 & 60.15 $\pm$ 0.03 \\
LP & 74.73 & 52.73\\
SGC &49.03 $\pm$ 0.93 & 52.03 $\pm$ 0.84 \\
GCN & 74.22 $\pm$ 0.49$^*$ & 62.31 $\pm$ 1.13$^*$ \\
GAT & \color{brown}\textbf{75.11 $\pm$ 1.45}$^*$ & \color{brown}\textbf{65.57 ± 0.34}$^*$  \\
\midrule
{\textsc{DIFFormer}\xspace}-s & \color{purple}\textbf{79.49 $\pm$ 0.44}$^*$ & \color{purple}\textbf{69.24 $\pm$ 0.76}$^*$ \\
\bottomrule
\end{tabular}}
    \end{minipage}
    \hspace{5pt}
    \begin{minipage}{0.66\linewidth}
   \subfigure[]{
    \begin{minipage}[t]{0.48\linewidth}
    \centering
    \includegraphics[width=\linewidth]{figure/cifar-ablation.pdf}
    \label{fig-abl}
    \vspace{-10pt}
    \end{minipage}
    }
    \subfigure[]{
    \begin{minipage}[t]{0.48\linewidth}
    \centering
    \includegraphics[width=\linewidth]{figure/cora_dis_depth.pdf}
    \label{fig-hyper}
    \vspace{-10pt}
    \end{minipage}
    }
    \vspace{-10pt}
    \caption{(a) Ablation studies w.r.t. different diffusivity function forms on \texttt{CIFAR}. (b) Impact of $K$ and $\tau$ on \texttt{Cora}.}
    \end{minipage}
    \vspace{-10pt}
\end{figure}

\begin{table}[tb!]
		\centering
		\small
		\caption{Testing accuracy for image (\texttt{CIFAR} and \texttt{STL}) and text (\texttt{20News}) classification.}
  \vspace{-5pt}
		\label{tab:image classification}
		\resizebox{0.95\textwidth}{!}{
		\begin{tabular}{c|c|ccccccc|cc}
		\midrule
		\multicolumn{2}{c|}{\textbf{Dataset}}  & MLP & LP & ManiReg  & GCN-$k$NN & GAT-$k$NN & DenseGAT & GLCN  & \textsc{DIFFormer}\xspace-s & \textsc{DIFFormer}\xspace-a  \\
		\midrule
		\multirow{3}{*}{\textbf{CIFAR}}
		& 100 labels &65.9 ± 1.3&66.2&67.0 ± 1.9&66.7 ± 1.5&66.0 ± 2.1 & out-of-memory &66.6 ± 1.4&\color{brown}\textbf{69.1 ± 1.1}&\color{purple}\textbf{69.3 ± 1.4} \\
		& 500 labels &73.2 ± 0.4&70.6&72.6 ± 1.2&72.9 ± 0.4&72.4 ± 0.5 & out-of-memory &72.8 ± 0.5&\color{purple}\textbf{74.8 ± 0.5}&\color{brown}\textbf{74.0 ± 0.6} \\
		& 1000 labels &75.4 ± 0.6&71.9&74.3 ± 0.4&74.7 ± 0.5&74.1 ± 0.5 & out-of-memory &74.7 ± 0.3&\color{purple}\textbf{76.6 ± 0.3}&\color{brown}\textbf{75.9 ± 0.3} \\
		\midrule
		\multirow{3}{*}{\textbf{STL}}
		& 100 labels &66.2 ± 1.4&65.2&66.5 ± 1.9&\color{brown}\textbf{66.9 ± 0.5}&66.5 ± 0.8 & out-of-memory &66.4 ± 0.8&\color{purple}\textbf{67.8 ± 1.1}&66.8 ± 1.1 \\
		& 500 labels &\color{brown}\textbf{73.0 ± 0.8}&71.8&72.5 ± 0.5&72.1 ± 0.8&72.0 ± 0.8 & out-of-memory &72.4 ± 1.3&\color{purple}\textbf{73.7 ± 0.6}&72.9 ± 0.7 \\
		& 1000 labels &75.0 ± 0.8&72.7&74.2 ± 0.5&73.7 ± 0.4&73.9 ± 0.6 & out-of-memory &74.3 ± 0.7&\color{purple}\textbf{76.4 ± 0.5}&\color{brown}\textbf{75.3 ± 0.6} \\
		\midrule
		\multirow{3}{*}{\textbf{20News}}
		& 1000 labels &54.1 ± 0.9&55.9&56.3 ± 1.2&56.1 ± 0.6&55.2 ± 0.8 & 54.6 ± 0.2 &56.2 ± 0.8&\color{brown}\textbf{57.7 ± 0.3}&\color{purple}\textbf{57.9 ± 0.7} \\
		& 2000  labels &57.8 ± 0.9&57.6&60.0 ± 0.8&60.6 ± 1.3&59.1 ± 2.2 & 59.3 ± 1.4 &60.2 ± 0.7&\color{brown}\textbf{61.2 ± 0.6}&\color{purple}\textbf{61.3 ± 1.0}  \\
		& 4000 labels &62.4 ± 0.6&59.5&63.6 ± 0.7&64.3 ± 1.0&62.9 ± 0.7 & 62.4 ± 1.0 &64.1 ± 0.8&\color{purple}\textbf{65.9 ± 0.8}&\color{brown}\textbf{64.8 ± 1.0}  \\
		\midrule
	\end{tabular}
		}
\vspace{-15pt}
	\end{table}

\subsection{Spatial-Temporal Dynamics Prediction}
We consider three spatial-temporal datasets with details in Appendix~\ref{appx-dataset}. Each dataset consists of a series of graph snapshots where nodes are treated as instances and each of them has a integer label (e.g., reported cases for \texttt{Chickenpox} or \texttt{Covid}). The task is to predict the labels of one snapshot based on the previous ones.
Table~\ref{tab:spatial_temporal_results} compares testing MSE of four \textsc{DIFFormer}\xspace variants (here \textsc{DIFFormer}\xspace-s w/o g denotes the model \textsc{DIFFormer}\xspace-s without using input graphs) against baselines. We can see that two \textsc{DIFFormer}\xspace variants without input graphs even outperform the counterparts using input structures in four out of six cases. This implies that our diffusivity estimation module could learn useful structures for informed prediction, and the input structure might not always contribute to positive effect. In fact, for temporal dynamics, the underlying relations that truly influence the trajectory evolution can be much complex and the observed relations could be unreliable with missing or noisy links, in which case GNN models relying on input graphs may perform undesirably. Compared to the competitors, our models rank the first with significant improvements.

\begin{table}[t!]
\centering
\caption{Mean and standard deviation of MSE on spatial-temporal prediction datasets.}
  \vspace{-5pt}
\label{tab:spatial_temporal_results}
\small
    \resizebox{1.0\textwidth}{!}{
\begin{tabular}{c|cccccc|cccc}
\toprule
\textbf{Dataset}& MLP&GCN&  GAT&Dense GAT&GAT-$k$NN&GCN-$k$NN&{\textsc{DIFFormer}\xspace}-s& {\textsc{DIFFormer}\xspace}-a& {\textsc{DIFFormer}\xspace}-s w/o g& {\textsc{DIFFormer}\xspace}-a w/o g \\
\midrule
\multirow{2}{*}{\textbf{Chickenpox}}& 0.924&\color{brown}\textbf{0.923}&0.924&0.935&0.926&0.936&0.926&0.926&\color{purple}\textbf{0.920}&\color{purple}\textbf{0.920}\\& ($\pm$0.001)&\color{brown}\textbf{($\pm$0.001)}&($\pm$0.002)&($\pm$0.005)&($\pm$0.004)&($\pm$0.004)&($\pm$0.002)&($\pm$0.008)&\color{purple}\textbf{($\pm$0.001)}&\color{purple}($\pm$\textbf{0.002})\\\midrule
\multirow{2}{*}{\textbf{Covid}}& 0.956&1.080&1.052&1.524&0.861&1.475&\color{brown}\textbf{0.792}&\color{brown}\textbf{0.792}&\color{purple}\textbf{0.791}&0.935\\
& ($\pm$0.198)&($\pm$0.162)&($\pm$0.336)&($\pm$0.319)&($\pm$0.123)&($\pm$0.560)&\color{brown}\textbf{($\pm$0.086)}&\color{brown}\textbf{($\pm$0.076)}&\color{purple}($\pm$\textbf{0.090})&($\pm$0.143)\\\midrule
\multirow{2}{*}{\textbf{WikiMath}}& 1.073&1.292&1.339&0.826&0.882&1.023&0.922&\color{brown}\textbf{0.738}&0.993&\color{purple}\textbf{0.720}\\& ($\pm$0.042)&($\pm$0.125)&($\pm$0.073)&($\pm$0.070)&($\pm$0.015)&($\pm$0.058)&($\pm$0.015)&\color{brown}\textbf{($\pm$0.031)}&($\pm$0.042)&\color{purple}($\pm$\textbf{0.036})\\
\bottomrule
\end{tabular}}
\vspace{-15pt}
\end{table}

\subsection{Further Results and Discussions}

\textbf{How do different diffusivity functions perform?} Figure~\ref{fig-abl} compares \textsc{DIFFormer}\xspace with four variants using other diffusivity functions that have no essential connection with energy minimization: 1) \emph{Identity} sets $\mathbf S^{(k)}$ as a fixed identity matrix; 2) \emph{Constant} fixes $\mathbf S^{(k)}$ as all-one constant matrix; 3) \emph{Full Attn} parameterizes $\mathbf S^{(k)}$ by attention networks~\citep{transformer}; 4) \emph{Kernel} adopts Gaussian kernel for computing $\mathbf S^{(k)}$. More results on other datasets are in Appendix~\ref{appx-abl} and they consistently show that our adopted diffusivity forms produce superior performance, which verifies the effectiveness of our diffusivity designs derived from minimization of a principled energy.

\textbf{How do model depth and step size impact the performance?} We discuss the influence of model depth $K$ and step size $\tau$ on \texttt{Cora} in Fig.~\ref{fig-hyper}. More results on \texttt{Citeseer} and \texttt{Pubmed} are generally consistent with Fig.~\ref{fig-hyper} and deferred to Appendix~\ref{appx-hyper}. The curves indicate that the performance of GCN and GAT models exhibit significant degradation with deeper layers, while \textsc{DIFFormer}\xspace maintains its superiority and performs stably with large $K$. Furthermore, when $K$ is not large enough (less than 32), there is a clear performance improvement of \textsc{DIFFormer}\xspace as $K$ increases, and larger $\tau$ contributes to a steeper increase. When $K$ continues increasing (more than 32), the model performance still goes up with small $\tau$ (0.1 and 0.25) yet exhibits a slight drop with large $\tau$ (0.5 and 0.9). The reason could be that larger (smaller) $\tau$ contributes to more (less) concentration on global information from other instances in each iteration, which brings up more (less) benefits with increasing propagation layers yet could lead to instability when the step size is too large.

\textbf{What is learned by the representation?}
We next try to shed some insights on how our diffusion models help to learn effective representations that facilitate downstream prediction, via visualizing node representations and layer-wise diffusivity strength in Appendix~\ref{appx-vis}. We found that the diffusivity strength estimates tend to increase the connectivity among nodes with different classes, and thus the updated node embeddings can absorb information from different communities for informative prediction. On the other hand, the produced representations exhibit smaller intra-class distance and larger inter-class distance, making them easier to be distinguished for classification. Comparing \textsc{DIFFormer}\xspace-s and \textsc{DIFFormer}\xspace-a on the temporal datasets, we found that \textsc{DIFFormer}\xspace-s produces more concentrated large weights while \textsc{DIFFormer}\xspace-a tends to have large diffusivity spreading out more and learn more complex structures. See more discussions in Appendix~\ref{appx-vis}.

\section{Conclusions}
\looseness=-1 This paper proposes an energy-driven geometric diffusion model with latent diffusivity function for data representations. The model encodes all the instances as a whole into evolving states aimed at minimizing a principled energy as implicit regularization. We further design two practical implementations with enough scalability and capacity for learning complex interactions over the underlying data geometry. Extensive experiments demonstrate the effectiveness and superiority of the model.

\bibliographystyle{iclr2023_conference}