# Oral 31735

- Kind: Oral
- Talk page and recording: https://iclr.cc/virtual/2025/oral/31735

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hi everyone, my name is Vinh, and today I'll be presenting our research titled Learning to Discretize the Noisy Indeficient ODEs. And let me show you an example. This image was generated by Flux, a state-of-the-art text-to-image model. The result looks great, but it took 7 seconds to generate. Now, if I only want to wait 3 seconds, here's what I get. As you can see, the quality drops significantly. But now, still using just 3 seconds, and with optimized time steps using our method, here's the result. Much better. In this research, we show how to make diffusion sampling faster without retraining the model, by learning better time discretization. Before diving into our method, let's quickly recap diffusion models. There are two main processes. A forward process that gradually adds noise to a clean sample x0, and a reverse process that removes noise, starting from xt, the fully noisy image. The index t controls the noise level. Higher t, more noise. To sample, we run the reverse process, which relies on a denoiser to move noise from level t to a slightly less noise level s. And when s is close to t, training a diffusion model is like learning an ODE, and sampling from diffusion is solving that ODE backward in time. However, sampling from diffusion models often requires multiple calls to the denoiser. And because the denoiser can be a big neural network, the sampling from diffusion models becomes super slow. So, a lot of recent research focuses on this goal, generating high-quality samples with fewer steps. To achieve this goal, perhaps the best well-known approach is denoiser distillation. Here, a student model is trained to mimic a pre-trained teacher model, using fewer time steps. However, this requires training a new model from scratch, which is time-consuming. For example, consistent distillation on Cypher10 takes about 8 GPU days to train. Now, let me introduce you to LD3. LD3 can be trained in just 5 minutes on Cypher10 using the same GPU. And unlike previous methods, LD3 doesn't train a new denoiser. Instead, it learns to optimize the time discretization for sampling, making the most of the existing pre-trained model. And now, let me try to convince you how crucial the time steps are. Here's a wide curve showing the graduate ODE trajectory, mapping a noisy sample to a clean one. This is the ideal path we want to follow. And to solve this ODE numerically, we need to discretize the time space. And let's say we use this uniform discretization. However, as you can see, the solution using uniform time steps deviates significantly from the graduate trajectory. Now, let's try to adjust the time steps a bit. As you can see now, the solution is much closer to the graduate. This shows how crucial the time step selection is, especially when we are limited to a few steps. And LD3 offers a way to optimize the time steps. LD3 is a teacher-student approach, where the teacher is many-step solver and student is few-step solver. They use the same denoiser network, and the objective is to learn discretization of time steps to align students with teacher output. And here's an illustration of the teacher and student solvers. The teacher takes many small steps and closely follows the graduate ODE trajectory. On the other hand, the student at the bottom uses only a few steps. And the idea is to use the same starting point, noisy sample xt, and then the objective is to align the trajectory sampling, trajectory endpoints, via backpropagating gradients for the time steps through the student ODE solver. However, one challenge with LD3 is that we are only updating a small number of parameters, which is the time steps. This makes the optimization very lightweight, but also introduces a risk of underfitting. Here's an illustration of the underfitting problem using the current design. We refer to this design as hard teacher forcing, and even after time step optimization, the student's endpoint can still be far from the teacher's. And to address underfitting, we introduce soft teacher forcing. So instead of forcing it to start exactly at teacher's xt, we allow it to start within a small ball around xt. We then jointly optimize the student's starting point and the time steps to better match the teacher's endpoint. This keeps the student's prior close to the original Gaussian while giving more flexibility to learn better solution. And that's how LD3 works. Now let's take a look at how LD3 performs in practice. We report LD scores for Cypher10 and ImageNet, and LD lower is better. The baselines include the best handcrafted discretization, GIFs, which focus on local discretization errors, and DMN, which minimizes global error bound under restrictive assumptions. However, overall, LD3 consistently outperforms all baselines, achieving significantly better evidence scores even with few steps. This plot shows how closely each method follows the teacher's output, and baselines exhibit large global discretization errors. In contrast, LD3 directly minimizes this error, yielding results that closely match the teacher, even with fewer steps. Now, let's take a look at some qualitative results. Here we apply LD3 to Flux model, a state-of-the-art text-to-image model. And here we have two images, both use 30 steps, and the left use Flux default schedule, while the right image use LD3 optimized time steps. As you can see, LD3 has sharper details and better overall quality, showing its effectiveness even with the same budget. LD3 can also boost performance in other domains, like protein ligand docking with DiffDoc. By optimizing the sampling process, LD3 reduces steps while maintaining high prediction quality, just like in image generation. So, to wrap up, we introduced LD3, a lightweight framework which can be used on any pre-trained diffusion models to optimize the time steps, for sampling not limited to just image generation, but also in other domains. And I'd like to take a moment to thank my incredible collaborators for their support and contributions to this work. So, for you, feel free to check out the code and more details on our GitHub. Thank you for your attention. Thank you for the exciting talk. We have some time for the Q&A. Any questions from the audience? If I just start the Q&A, one question that I had is that I was wondering whether there would be some kind of patterns in terms of the optimal time steps, like depending on some kind of initial x0 or some kind of conditions, especially for some conditional generation, would there be some kind of cases that it might be better to start with some kind of larger steps at the beginning, like making it smaller for some cases, or starting with smaller steps and making it bigger? So, I was wondering whether there might be some kind of empirical patterns that you could find from this kind of approaches. So, thanks for the question. So, if I understand correctly, the question was like, should we predict the time step depends on the initialized xt? Yeah, because you're suggesting like learning some kind of optimal time steps for each of the cases, right? Right. But if the optimal time steps are kind of similar for all the cases, we don't need to learn, right? Yes. So, actually, this is our simplest setting where we learn the global discretization for all the starting points. We don't care about the condition. It's unconditional. It's independent from the prompt. It's independent from the initial noise sample. But I think it's a good research question. And in the future, we can also consider the starting points as well as the prompt and other conditions. Yeah. What about the noise schedule? Is it dependent on the noise schedule though, no? Right? So, actually, it's also independent from the noise schedule for training. So, given the... For sampling. So, here's our method is learning that schedule for sampling, right? You learn the time steps, but not how fast or how slow you noise, no? So, okay. So, now I understand your question. So, actually, yeah, the only thing we learn is the time steps. Yeah, it's also independent from the noise schedule. So, the time step are not dependent on how fast or how slow? So, from the time step, you compute the alpha and sigma for noise schedule, right? Yeah, but the choice of alpha. The choice of alpha. Yeah. So, with any choice of alpha, you can always apply our model on top of that and then learn the time steps. Oh, yeah. Thank you. Hello. Thank you for the talk. Just a small question. What about the applicability of your methods to video diffusion models? Because for video is also a crucial drawback, the slow sampling speed. So, in our paper, we didn't try it on video generation, but there's baseline. I believe it's called Align Your Step, which is also a paper that learned the time step. And they also have experiments on video generation. And we believe that our method can also be applied on top of that, although we didn't try it. But yeah, I think we also can do it for video generation. Okay. So, I think this is the end of the session. So, let's give a big round of applause to our presenters.
