Deep Equilibrium Approaches to Diffusion Models
Abstract
Diffusion-based generative models are extremely effective in generating highquality images, with generated samples often surpassing the quality of those produced by other models under several metrics.
One distinguishing feature of these models, however, is that they typically require long sampling chains to produce high-ﬁdelity images.
This presents a challenge not only from the lenses of sampling time, but also from the inherent difﬁculty in backpropagating through these chains in order to accomplish tasks such as model inversion, i.e., approximately ﬁnding latent states that generate known images.
In this paper, we look at diffusion models through a different perspective, that of a (deep) equilibrium (DEQ) ﬁxed point model.
Speciﬁcally, we extend the recent denoising diffusion implicit model (DDIM) [68], and model the entire sampling chain as a joint, multi-variate ﬁxed point system.
This setup provides an elegant uniﬁcation of diffusion and equilibrium models, and shows beneﬁts in 1) single image sampling, as it replaces the fully-serial typical sampling process with a parallel one; and 2) model inversion, where we can leverage fast gradients in the DEQ setting to much more quickly ﬁnd the noise that generates a given image.
The approach is also orthogonal and thus complementary to other methods used to reduce the sampling time, or improve model inversion.
We demonstrate our method’s strong performance across several datasets, including CIFAR10, CelebA, and LSUN Bedroom and Churches.
Introduction
Diffusion models have emerged as a promising class of generative models that can generate high quality images [69, 68, 57], outperforming GANs on perceptual quality metrics [19] and likelihoodbased models on density estimation [42].
One of the limitations of these models, however, is the fact that they require a long diffusion chain (many repeated applications of a denoising process), in order to generate high-ﬁdelity samples.
Several recent papers have focused on tackling this limitation, e.g., by shortening the length of diffusion process through an alternative parameterization [68, 44], or through progressive distillation of a sampler with large diffusion chain into a smaller one [54, 65].
However, all of these methods still rely on a fundamentally sequential sampling process, imposing challenges on accelerating the sampling and for other applications like differentiating through the entire generation process.
In this paper, we propose an alternative approach that also begins to address such challenges from a different perspective.
Speciﬁcally, we propose to model the generative process of a speciﬁc class of diffusion model, the denoising diffusion implicit model (DDIM) [68], as a deep equilibrium (DEQ) model [6].
Deep equilibrium (DEQ) models are networks that aim to ﬁnd the ﬁxed point of the underlying system in the forward pass and differentiate implicitly through this ﬁxed point in the backward pass.
To apply DEQs to diffusion models, we ﬁrst formulate this process as an equilibrium system consisting of all T joint sampling steps, and then simultaneously solve the ﬁxed point of all the T steps to achieve sampling.
This approach has several beneﬁts: First , the DEQ sampling process can be solved in parallel over multiple GPUs by batching the workload.
This is particularly beneﬁcial in the case of single image ( i.e., batch-size-one) generation, where the serial sampling nature of diffusion models has inevitably made them unable to maximize GPU computation.
Second , solving for the joint equilibria simultaneously leads to faster overall convergence as we have better estimates of the intermediate states in fewer steps.
Speciﬁcally, the formulation naturally lends itself to an augmented diffusion chain that each state is generated according to all others.
Third , the DEQ formulation allows us to leverage a faster differentiation through the chain.
This enables us to much more effectively solve problems that require us to differentiate through the generative process, useful for tasks such as model inversion that seeks to ﬁnd the noise that leads to a particular instance of an image.
We demonstrate the advantages of this formulation on two applications: single image generation and model inversion.
Both single image generation and model inversion are widely applied in real world image manipulation tasks like image editing and restoration [77, 63, 35, 2, 49, 55].
On CIFAR10 [46] and CelebA [52], DEQ achieves up to 2 ⇥ speedup over the sequential sampling processes of
DDIM [68], while maintaining a comparable perceptual quality of images.
In the model inversion, the loss converges much faster when trained with DEQs than with sequential sampling.
Moreover, optimizing the sequential sampling process can be computationally expensive.
Leveraging modern autograd packages is infeasible as they require storing the entire computational graph for all T states.
Some recent works like Nie et al.
[58] achieve this through use of SDE solvers.
In contrast, with
DEQs we can use the implicit differentiation of O (1) memory complexity.
Empirically, the initial hidden state recovered by DEQ more accurately regenerates the original image while capturing its ﬁner details.
To summarize, our main contributions are as follows:
• We formulate the generative process of an augmented type of DDIM as a deep equilibrium model that allows the use of black-box solvers to efﬁciently compute the ﬁxed point and generate images.
• The DEQ formulation parallelizes the sampling process of DDIM, and as a result, it can be run on multiple GPUs instead of a single GPU.
This alternate sampling process converges faster compared to the original process.
• We demonstrate the advantages of our formulation on single image generation and model inversion.
We ﬁnd that optimizing the sampling process via DEQs consistently outperforms naive sequential sampling.
• We provide an easy way to extend this DEQ formulation to a more general family of diffusion models with stochastic generative process like DDPM [67, 33].
Preliminaries
Diffusion Models Denoising diffusion probabilistic models (DDPM)
[67, 33] are generative models that can convert the data distribution to a simple distribution, ( e.g., a standard Gaussian, N ( 0 , I ) ), through a diffusion process.
Speciﬁcally, given samples from a target distribution x 0 ⇠ q ( x 0 ) , the diffusion process is a Markov chain that adds Gaussian noises to the data to generate latent states x 1 , ..., x T in the same sample space as x 0 .
The inference distribution of diffusion process is given by:
[Equation]
[Equation]
To learn the parameters ✓ that characterize a distribution p ✓ ( x 0 ) =
R p ✓ ( x 0: T ) d x 1: T as an approximation of q ( x 0 ) , a surrogate variational lower bound [67] was proposed to train this model:
[Equation]
+
X t
D
[Equation] [Equation]
( x t  1 | x t , x 0 ) ||
p ✓ ( x t  1 | x t ) + D KL (
[Equation]
x T | x 0 )
|| p
[Equation]
x T )] (2)
After training, samples can be generated by a reverse Markov chain, i.e., ﬁrst sampling x T ⇠ p ( x T ) , and then repeatedly sampling x t  1 till we reach x 0 .
As noted in [67, 68], the length T of a diffusion process is usually large ( e.g., T = 1000 [33]) as it contributes to a better approximation of Gaussian conditional distributions in the generative process.
However, because of the large value of T , sampling from diffusion models can be visibly slower compared to other deep generative models like GANs [29].
One feasible acceleration is to rewrite the forward process into a non-Markovian one that leads to a “shorter” and deterministic generative process, i.e., denoising diffusion implicit model [68] (DDIM).
DDIM can be trained similarly to DDPM, using the variational lower bound shown in Eq.
Essentially, DDIM constructs a nearly non-stochastic scheme that can quickly sample from the learned data distribution without introducing additional noises.
Speciﬁcally, the scheme to generate a sample x t  1 given x t is:
[Equation]
where ↵ 1 , ..., ↵ T 2 (0 , 1] , ✏ t ⇠ N ( 0 , I ) , and ✏ ( t ) ✓ ( x t ) is an estimator trained to predict the noise given a noisy state x t .
Different values of  t deﬁne different generative processes.
For a variance schedule  1 . . .
T , we use the notation ↵ t =
Q t s =1 (1   s ) .
When  t = p (1  ↵ t  1 ) / (1  ↵ t ) p 1  ↵ t / ↵ t  1 for all t , the generative process represents a DDPM.
Setting  t = 0 for all t gives rise to a DDIM, which results in a deterministic generating process except the initial sampling x T
⇠ p ( x T ) .
Deep Equilibrium Models Deep equilibrium models are a recently-proposed class of deep networks that, in their forward pass, seek to ﬁnd a ﬁxed point of a single layer applied repeatedly to a hidden state.
Speciﬁcally, consider a deep feedforward model with L layers:
[Equation]
where x is the input injection,
z
[ i ] is the hidden state of i
th layer, and f [ i ] ✓ is a layer that deﬁnes the feature transformation.
Assuming the above model is weight-tied, i.e., f
[ i ] ✓ = f ✓ , 8 i , then in the limit of inﬁnite depth, the output z
[ i ] of this network converges to a ﬁxed point z ⇤ .
[Equation]
Inspired from the neural convergence phenomenon, Deep equilibrium (DEQ) models [6] are proposed to directly compute this ﬁxed point z ⇤ as the output, i.e.,
[Equation]
The equilibrium state z ⇤ can be solved by black-box solvers like Broyden’s method [13], or Anderson acceleration [5].
To train this ﬁxed-point system, Bai et al.
[6] leverage implicit differentiation to directly backpropagate through the equilibrium state
z ⇤ using O (1) memory complexity.
DEQ is known as a principled framework for characterizing convergence and energy minimization in deep learning.
We leave a detailed discussion in Sec. 6.
A Deep Equilibrium Approach to DDIMs
In this section, we present the main modeling contribution of the paper, a formulation of diffusion processes under the DEQ framework.
Although diffusion models may seem to be a natural ﬁt for
DEQ modeling (after all, we typically do not care about intermediate states in the denoising chain, but only the ﬁnal clean image), there are several reasons why setting up the diffusion chain “naively” as a
DEQ ( i.e., making f ✓ be a single sampling step) does not ultimately lead to a functional algorithm.
Most fundamentally, the diffusion process is not time-invariant ( i.e., not “weight-tied” in the DEQ sense), and the ﬁnal generated image is practically-speaking independent of the noise used to generate it ( i.e., not truly based upon “input injection” either).
Thus, at a high level, our approach to building a DEQ version of the DDIM involves representing all the states x 0: T simultaneously within the DEQ state.
The advantage of this approach is that 1) we can exactly capture the typical diffusion inference chain; and 2) we can create a more expressive reverse process where the state x t is updated based upon all previous states x t +1: T , improving the inference process; 3) we can execute all steps of the inference chain in parallel rather than solely in sequence as is typically required in diffusion models; and 4) we can use common DEQ acceleration methods, such as the Anderson solver [5] to ﬁnd the ﬁxed point, which makes the sampling process converge faster.
A downside of this formulation is that we need to store all DEQ states simultaneously ( i.e., only the images, not the intermediate network states).
3.1 A DEQ formulation of DDIMs (DEQ-DDIM)
The generative process of DDIM is given by:
[Equation]
This process also lets us generate a sample using a subset of latent states { x ⌧ 1 , . . .
, x ⌧ S } , where { ⌧ 1 , . . .
, ⌧ S } ✓ T .
While this helps in accelerating the overall generative process, there is a tradeoff between sampling quality and computational efﬁciency.
As noted in Song et al.
[68], larger T values lead to lower FID scores of the generated images but need more compute time; smaller T are faster to sample from, but the resulting images have worse FID scores.
Reformulating this sampling process as a DEQ addresses multiple concerns raised above.
We can deﬁne a DEQ, with a sequence of latent states x 1: T as its internal state, that simultaneously solves for the equilibrium points at all the timesteps.
The global convergence of this process is upper bounded by T steps, by deﬁnition.
To derive the DEQ formulation of the generative process, ﬁrst we rearrange the terms in Eq.
[Equation]
Let c ( t ) 1 = p 1  ↵ t
[Equation]
r
[Equation]
↵
[Equation]
Then we can write
[Equation] [Equation]
By induction, we can rewrite the above equation as:
[Equation]
This deﬁnes a “fully-upper-triangular” inference process, where the update of x t depends on the noise prediction network ✏ ✓ applied to all subsequent states x t +1:
T ; in contrast to the traditional diffusion process, which updates x t based only on x t +1 .
Speciﬁcally, let h ( · ) represent the function that performs the operations in the equations (10) for a latent x t at timestep t , and let ˜ h ( · ) represent the function that performs the same set of operations across all the timesteps simultaneously.
We can write the above set of equations as a ﬁxed point system:
[Equation]
or,
[Equation]
The above system of equations represent a DEQ with x T ⇠ N ( 0 , I ) as input injection.
We can simultaneously solve for the roots of this system of equations through black-box solvers like Anderson acceleration [5].
Let g ( x 0: T  1 ; x T ) =
˜
[Equation]
( x 0: T  1 ; x T )  x 0: T  1 , then we have x ⇤ 0:
[Equation]
=
RootSolver ( g ( x
[Equation]
x
[Equation]
This DEQ formulation has multiple beneﬁts.
Solving for all the equilibria simultaneously leads to a better estimation of the intermediate latent states x t in a fewer number of steps ( i.e.,  t steps for x t ).
This leads to faster convergence of the sampling process as the ﬁnal sample x 0 , which is dependent on the latent states of all the previous time steps, has a better estimate of these intermediate latent states.
Note that by the same reasoning, the intermediate latent states x t converge faster too.
Thus, we can get images with perceptual quality comparable to DDIM in a signiﬁcantly fewer number of steps.
Of course, we also note that the computational requirements of each individual step has signiﬁcantly increased, but this is at least largely offset by the fact that the steps can be executed as mini-batched in parallel over each state.
Empirically, in fact, we often notice signiﬁcant speedup using this approach on tasks like single image generation.
This DEQ formulation of DDIM can be extended to the stochastic generative processes of DDIM with ⌘ > 0 , including that of DDPM (referred to as DEQ-sDDIM).
The key idea is to sample noises for all the time steps along the sampling chain and treat this noise as an input injection to DEQ, in addition to x T .
[Equation]
(13) where RootSolver( · ) is any black-box ﬁxed point solver, and ✏ 1: T ⇠ N ( 0 , I ) represents the input injected noises.
We discuss this formulation in more detail in Appendix D.
Efﬁcient Inversion of DDIM
One of the primary strengths of DEQs is their constant memory consumption, for both forward pass and backward pass, regardless of their ‘effective depth’.
This leads to an interesting application of
DEQs in inverting DDIMs that fully leverages this advantage along with the other beneﬁts discussed in the previous section.
Input: A target image x 0 ⇠ D , ✏ ✓ ( x t , t )
a
trained denoising diffusion model,
N the total number of epochs .
f denotes the sampling process in Eq (7)
Initialize ˆ x T ⇠ N ( 0 , I ) for epochs from 1 to N do for t =
T, ..., 1 do
Sample ˆ x t
[Equation]
= f
[Equation] [Equation]
(ˆ x t , t )) end for
Take a gradient descent step on
[Equation]
end for
Output: ˆ x T
Algorithm
Input: A target image x 0 ⇠ D , ✏ ✓ ( x t , t ) a trained denoising diffusion model, N the total number of epochs .
g is the function in Eq.
Initialize ˆ x 0: T ⇠ N ( 0 , I ) for epochs from 1 to N do .
Disable gradient computation x ⇤ 0: T = RootSolver ( g ( x 0: T  1 ); x T ) .
Enable gradient computation
Compute Loss L ( x 0 , x ⇤ 0 ) Use the 1-step grad to compute @
L / @ x T
Take a gradient descent step using above end for
Output: x ⇤ T
4.1 Problem Setup
Given an arbitrary image x 0 ⇠ D , and a denoising diffusion model ✏ ✓ ( x t , t ) trained on a dataset D , model inversion seeks to determine the latent ˆ x T ⇠ N ( 0 , I ) that can generate an image ˆ x 0 identical to the original image x 0 through the generative process for DDIM described in Eq.
For an input image x 0 , and a generated image ˆ x 0 , this task needs to minimize the squared-Frobenius distance between these images:
[Equation]
4.2 Inverting DDIM: The Naive Approach
A relatively straightforward way to invert DDIM is to randomly sample x T ⇠ N ( 0 , I ) , and update it via gradient descent by ﬁrst estimating x 0 using the generative process in Eq.
(7) and backpropagating through this process after computing the loss objective in (14).
The overall process has been summarized in Algorithm 1.
This process has a large computational overhead.
Every training epoch requires a sequential sampling for all T timesteps.
Optimizing through this generative process would require the creation of a large computational graph for storing relevant intermediate variables necessary for the backward pass.
Sequential sampling further slows down the entire process.
4.3 Efﬁcient Inversion of DDIM with DEQs
Alternatively, we can use the DEQ formulation to develop a much more efﬁcient inversion method.
We provide a high-level overview of this approach in Algorithm 2.
We can apply implicit function theorem (IFT) to the ﬁxed point, i.e., (12) to compute gradients of the loss L ( x 0 , x ⇤ 0 ) in (14) w.r.t.
[Equation]
where ( · ) could be any of the latent states x 1 , ..., x T , and J  1 g ✓  x ⇤ 0: T is the inverse Jacobian of g ( x 0: T  1 ; x T ) evaluated at x ⇤ 0: T .
Refer to [6] for a detailed proof.
Computing the inverse of
Jacobian matrix can become computationally intractable, especially when the latent states x t are high dimensional.
Further, prior works [6, 8, 28] have reported growing instability of DEQs during training due to the ill-conditioning of Jacobian.
Recent works [27, 26, 28, 9] suggest that we do not need an exact gradient to train DEQs.
We can instead use an approximation to Eq.
(15), i.e.,
[Equation] [Equation]
where M is an approximation of J  1 g ✓  x ⇤ 0: T .
For example, [27, 26, 28] show that setting M
= I , i.e., 1-step gradient, works well.
In this work, we follow Geng et al.
[28] to further add a damping factor to the 1-step gradient.
The forward pass is given by:
[Equation]
The gradients for the backward pass can be computed through standard autograd packages.
We provide the PyTorch-style pseudocode of our approach in the Appendix B. Using inexact gradients for the backward pass has several beneﬁts: 1) It remarkably improves the training stability of DEQs; 2) Our backward pass consists of a single step and is ultra-cheap to compute.
It reduces the total training time by a signiﬁcant amount.
It is easy to extend the strategy used in Algorithm 2 and use
DEQs to invert DDIMs with stochastic generative process (referred to as DEQ-sDDIM).
We provide the key steps of this approach in Algorithm 4.
Experiments
We consider four datasets that have images of different resolutions for our experiments: CIFAR (32 ⇥ 32) [46], CelebA (64 ⇥ 64)
[52], LSUN Bedroom (256 ⇥ 256) and LSUN Outdoor Church (256 ⇥ 256) [76].
For all the experiments, we use Anderson acceleration as the default ﬁxed point solver.
We use the pretrained denoising diffusion models from Ho et al.
[33] for CIFAR10, LSUN
Bedroom, and LSUN Outdoor Church, and from Song et al.
[68] for CelebA.
While training DEQs for model inversion, we use the 1-step gradient Eq.
(18) to compute the backward pass.
The damping factor ⌧ for 1-step gradient is set to 0 .
All the experiments have been performed on NVIDIA RTX
A6000 GPUs.
We provide additional experimental details in the Appendix A. While the primary focus in this section will be on the DDIM with a deterministic generative process i.e., ⌘ = 0 , we also include a few key results on stochastic version of DDIM (DEQ-sDDIM) here.
More extensive experiments can be found in Appendix D.
5.1 Convergence of DEQ-DDIM
We verify that DEQ converges to a ﬁxed point by plotting the values of k ˜ h ( x 0: T )  x 0: T k 2 over Anderson solver steps.
As seen in Figure 1, DEQ converges to a ﬁxed point for generative processes of different lengths.
It is easier to reach simultaneous equilibria on smaller sequence lengths than larger sequence lengths.
However, this does not affect the quality of images generated.
We visualize the latent states of DEQ in Figure 2.
Our experiments demonstrate that DEQ is able to generate high-quality images in as few as 15 Anderson solver steps on diffusion chains that were trained on a much larger number of steps T .
One might note that DEQs converge to a limit cycle for diffusion processes with larger sequence lengths.
This is not a limitation as we only want the latent states at the last few timesteps to converge well, which happens in practice as demonstrated in Fig.
Further, these residuals can be driven down by using more powerful solvers like quasi-Newton methods, e.g., Broyden’s method.
5.2 Sample quality of images generated with DEQ
We verify that DEQs can generate images of comparable quality to DDIM by reporting Fréchet
Inception Distance (FID) [32] in Table 1.
For the forward pass of DEQ, we run Anderson solver for a maximum of 15 steps for each image.
We report FID scores on 50,000 images, and average time to generate an image (including GPU time) on 500 images.
We note signiﬁcant gains in wall-clock time on single-shot image generation with DEQs on images with smaller resolutions.
Speciﬁcally, DEQs can generate images almost 2 ⇥ faster than the sequential sampling of DDIM on CIFAR-10 (32 ⇥ 32) and CelebA (64 ⇥ 64).
We note that these gains vanish on sequences of shorter lengths and images with larger resolutions as seen in case of LSUN Bedrooms, and Outdoor Churches (256 ⇥ 256).
This is because the number of ﬁxed point solver iterations needed for convergence becomes comparable to the length of diffusion chain for small values of T .
Thus, lightweight updates performed on short diffusion chains for sequential sampling are faster compared to compute heavy updates in DEQs.
We also report FID scores on DEQ-sDDIM for CIFAR10 in Table 2.
We run Anderson solver for a maximum of 50 steps for each image.
We observe that while DEQ-sDDIM is slower than DDIM, it always generates images with comparable or better FID scores.
For higher levels of stochasticity i.e., for larger valued of ⌘ , DEQ-sDDIM need more Anderson solver iterations to converge to a ﬁxed point, which increases image generation wall-clock time.
We include additional results in
Appendix D.2.
Finally, we also ﬁnd that on full-batch inference with larger batches, sequential sampling might outperform DEQs, as DEQs would have larger memory requirements in this case, i
[Table]
e., processing smaller batches of size B might be faster than processing larger batches of size BT .
[Table]
[Table]
Note that DDPM [33] with a larger variance achieves FID scores of 133 .
37 ⇤ and 32 .
⇤ respectively for
T = 20 and T = 50 , where ⇤ indicates numbers reported from Song et al.
5.3 Model Inversion of DDIM with DEQs
We report the minimum values of squared Frobenius norm between the recovered and target images averaged from 100 different runs in Table 3.
We report results for DEQ with ⌘ =
( i.e., DEQ-DDIM) in this table, and additional results for ⌘ > 0 ( i.e., DEQ-sDDIM) are reported in Figure 17.
DEQ outperforms the baseline method on all the datasets by a signiﬁcant margin.
We also plot the training loss curves of DEQ-DDIM and the baseline in Figure 3.
We observe that DEQ-DDIM converges faster and has much lower loss values than the baseline method induced by DDIM.
We also visualize the images generated with the recovered latent states for DEQ-DDIM in Figure 4 and with DEQ-sDDIM in Figure 5.
It is worth noting that images generated with DEQ capture more vivid details of the original images, like textures of foliage, crevices, and other ﬁner details than the baseline.
We include additional results of model inversion with DEQ-sDDIM on different datasets in Appendix D.3.
[Table]
Related Work
Implicit Deep Learning Implicit deep learning is an emerging ﬁeld that introduces structured methods to construct modern neural networks.
Different from prior explicit counterparts deﬁned by hierarchy or layer stacking, implicit models take advantage of dynamical systems [43, 23, 3], e.g., optimization [4, 72, 20, 27, 21], differential equation [16, 22, 70, 30], or ﬁxed-point system [6, 7, 31].
For instance, Neural ODE [16] describes a continuous time-dependent system, while Deep
Equilibrium (DEQ) model [6], which is actually path-independent, is a new type of implicit models that outputs the equilibrium states of the underlying system, e.g., z ⇤ from z ⇤ =
f ✓ ( z ⇤ , x ) given the input x .
This ﬁxed-point system can be solved by black-box solvers [5, 13], and further accelerated by the neural solver [10] in the inference.
An active topic is the stability [8, 28, 9] of such a system as it will gradually deteriorate during training, albeit strong performances [16, 6, 8].
DEQ has achieved
SOTA results on a wide-range of tasks like language modeling [6], semantic segmentation [7], graph modeling [31, 51, 59, 15], object detection [73], optical ﬂow estimation [9], robustness [74, 48], and generative models like normalizing ﬂow [53], with theoretical guarantees [75, 38, 25, 50].
Diffusion Models Diffusion models [67, 33, 68], or score-based generative models [69, 71], are newly developed generative models that utilize an iterative denoising process to progressively sample from a learned data distribution, which actually is the reverse of a forward diffusion process.
They have demonstrated impressive ﬁdelity for text-conditioned image generation [62] and outperformed state-of-the-art GANs on ImageNet [19].
Despite the superior practical results, diffusion models suffer from a plodding sampling speed, e.g., over hours to generate 50k CIFAR-sized images [68].
To accelerate the sampling from diffusion models, researchers propose to skip a part of the sampling steps by reframing the reverse chain [68, 45, 44], or distill the trained diffusion model into a faster one [54, 65].
Plus, the forward and backward processes in diffusion models can be formulated as stochastic differential equations [71], bridging diffusion models with Neural ODEs [16] in implicit deep learning.
However, the community still lacks insights into the connection between DEQ and diffusion models, where we build our work to investigate this.
Model inversion Model inversion gives insights into the latent space of a generative model, as an inability of a generative model to correctly reconstruct an image from its latent code is indicative of its inability to model all the attributes of image correctly.
Further, the ability to manipulate the latent codes to edit high-level attributes of images ﬁnds applications in many tasks like semantic image manipulation [77, 2], super resolution [14, 47], in-painting [18], compressed sensing [12], etc.
For generative models like GANs [29], inversion is non-trivial and requires alternate methods like learning the mapping from an image to the latent code [11, 61, 78], and optimizing the latent code through optimizers, e.g., both gradient-based [1] and gradient-free [34].
For diffusion models like DDPM [33], the generative process is stochastic, which can make model inversion very challenging.
Many existing works based on diffusion models [55, 18, 71, 36, 40] edit images or solve inverse problems without requiring full model inversion.
Instead, they do so by utilizing existing understanding of diffusion models as presented in some recent works [71, 37, 39].
Diffusion models have been widely applied to conditional image generation [17, 18, 57, 64, 36, 66, 40, 56].
Chung et al.
[18] propose a method to reduce the number of steps in reverse conditional diffusion process through better initialization, based on the idea of contraction theory of stochastic differential equations.
Our proposed method is orthogonal to this work; we explicitly model DDIM as a joint, multi-variate ﬁxed point system and leverage black-box root solvers to solve for the ﬁxed point and also allow for efﬁcient differentiation.
Conclusion
We propose an approach to elegantly unify diffusion models and deep equilibrium (DEQ) models.
We model the entire sampling chain of the denoising diffusion implicit model (DDIM) as a joint, multivariate (deep) equilibrium model.
This setup replaces the traditional sequential sampling process with a parallel one, thereby enabling us to enjoy speedup obtained from multiple GPUs.
Further, we can leverage inexact gradients to optimize the entire sampling chain quickly, which results in signiﬁcant gains in model inversion.
We demonstrate the beneﬁts of this approach on 1) single-shot image generation, where we were able to obtain FID scores on par with or slightly better than those of DDIM; and 2) model inversion, where we achieved much faster convergence.
We also propose an easy way to extend DEQ formulation for deterministic DDIM to its stochastic variants.
It is possible to further speedup the sampling process by training a DEQ model to predict the noise at a particular timestep of the diffusion chain.
We can jointly optimize the noise prediction network, and the latent variables of the diffusion chain, which we leave as future work.
Acknowledgements
Ashwini Pokle is supported by a grant from the Bosch Center for Artiﬁcial Intelligence.
Checklist
The checklist follows the references.
Please read the checklist guidelines carefully for information on how to answer these questions.
For each question, change the default [TODO] to [Yes] , [No] , or [N/A] .
You are strongly encouraged to include a justiﬁcation to your answer , either by referencing the appropriate section of your paper or providing a brief inline description.
For example:
• Did you include the license to the code and datasets? [Yes] • Did you include the license to the code and datasets?
[No] The code and the data are proprietary.
• Did you include the license to the code and datasets?
[N/A]
Please do not modify the questions and only use the provided macros for your answers.
Note that the
Checklist section does not count towards the page limit.
In your paper, please delete this instructions block and only keep the Checklist section heading above along with the questions/answers below.
For all authors... (a) Do the main claims made in the abstract and introduction accurately reﬂect the paper’s contributions and scope?
[Yes] (b) Did you describe the limitations of your work?
[Yes] (c) Did you discuss any potential negative societal impacts of your work?
[Yes] (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] 2.
If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[Yes] (b) Did you include complete proofs of all theoretical results?
[Yes] 3.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[Yes] (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[Yes] 4.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[Yes] (b) Did you mention the license of the assets?
[Yes] (c) Did you include any new assets either in the supplemental material or as a URL?
[Yes] (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
[Yes] (e) Did you discuss whether the data you are using/curating contains personally identiﬁable information or offensive content?
[N/A] 5.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]