Diffusion Models From Scratch | Score-Based Generative Models Explained | Math Explained

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 122

  • @outliier
    @outliier  Месяц назад +65

    Since these videos take an enormous amount of time (this one took about 300 hours), would you like to see, additionally, paper explanations in the style of Yannic Kilcher (www.youtube.com/@YannicKilcher) ? I could cover papers very quickly after they are released and also cover topics I wouldn’t do an animated video for. Let me know what you think :)

    • @r00t257
      @r00t257 Месяц назад +1

      1000% yessssss ❤❤❤🎉

    • @DonCat-sc3qo
      @DonCat-sc3qo Месяц назад

      Sure 👍🏻

    • @suraj7984
      @suraj7984 Месяц назад +5

      Sure! But I would prefer a deep dive once in a while to many simple paper explanations. There aren't many (video) resources for diffusion that go in such depth. So this is really great, thanks a lot for doing the video!

    • @outliier
      @outliier  Месяц назад

      @@suraj7984 gotcha, yea I will keep doing normal videos. Was just wondering if other formats are also interesting

    • @nirajpudasaini4450
      @nirajpudasaini4450 Месяц назад

      I think you should do both ... sorry. You explain in such a better way. Thanks alot for doing this.

  • @Cyan-g2g
    @Cyan-g2g Месяц назад +10

    Wow! I did not expect this video to go this deep. But this is awesome! Please make more in depth explanation like this. It’s clear a lot of hard work went into it and the animation is sooo elegant

  • @UmbrabbitMagnolia
    @UmbrabbitMagnolia 22 дня назад +1

    I have watched this video for three times, may watch this video again. Thank you.

  • @venkatbalachandra5965
    @venkatbalachandra5965 Месяц назад +3

    I absolutely love how you started from scratch, as in what the underlying PDF was. I'm working on a project on diffusion models and I don't know anything about it, and all the resources available are catered towards those with prerequisites I don't have yet, until this one. I haven't yet watched the whole thing, but I'm going to keep coming back to this till I understand everything in this video. Cheers mate!

  • @huytruonguic
    @huytruonguic Месяц назад

    love your mathematics explanation and visualization, no fancy transitions were needed, just slow, simple, and clear english phrases

  • @tilaksharma7768
    @tilaksharma7768 Месяц назад

    A series on topics like this would be a gold mine. Great work!!

  • @Xynolphia
    @Xynolphia Месяц назад

    Most of the diffusion models I've watched so far and mainly using images to sample. This video is really great in terms of understanding the fundamentals. Would love to see more in depth explanation from zero to hero.

  • @phucnguyenthanh9223
    @phucnguyenthanh9223 Месяц назад +1

    1 year. See you back with a really easy to understand explanation. Thank you!

    • @outliier
      @outliier  Месяц назад +4

      Will be more active!

  • @Тима-щ2ю
    @Тима-щ2ю Месяц назад

    Thank you for your work! I have started to learn about diffusion models and found that this is more complex idea than VAE idea and GAN idea. However, the people who try to explain these complex concepts to others are very impressive!

  • @איילתדמור
    @איילתדמור Месяц назад +1

    Amazing video, thank you. I learned most of it a year ago in university but this was a great refresher which also provided me with new insights to some of the stuff. I really liked the conclusion of the Denoising Score Matching part, very beautiful.

  • @novantha1
    @novantha1 Месяц назад

    Your videos are somehow simultaneously timely and timeless. Your content is absolutely appreciated and I wish you the best in your endeavors.

  • @InturnetHaetMachine
    @InturnetHaetMachine Месяц назад +1

    Regarding your pinned comment. No offense to Yannic, but your explanations are 10x better. The topics you've covered you actually understand, you explain not only what is going on, but also why. That, and you going into mathematical explanations are really appreciated. Don't worry about the quantity, it's easy to read a paper, and put surface level explanations out for more views, what you're doing is more valuable. Your videos are a treasure for amateur Deep Learning hobbyists like me who want to dig deeper into this field.

  • @BenjaminEvans316
    @BenjaminEvans316 Месяц назад

    Your videos are great. You do well at taking very complex maths topics and walking through them. The summary at the end also helps.

  • @arpanpoudel
    @arpanpoudel Месяц назад +1

    I used Score-SDE in my thesis and I have my defense next week :D what a timing

  • @wolfeinstien313
    @wolfeinstien313 12 дней назад

    This is the best explanation of score based models, I imagine I will be rewatching this video over and over. I have also always struggled to understand where some of the Maths results in the big papers come from, you do a very good job demystifying that. I can say I have a much more intuitive understanding of score based models now. I hope to see more deep dives on similar topics (can I suggest "Flow matching for generative modelling" Arxiv - 2210.02747? I would love to see your take on it). Also very interested in more regular Yannick Kilcher style paper journal club videos (and also a discussion group to go along with it?).

    • @outliier
      @outliier  12 дней назад +1

      @@wolfeinstien313 love to hear that! Already started working on a video about Flow Matching ! Might share progress on twitter if you wanna follow around there :)

  • @JieqiLiu-f1o
    @JieqiLiu-f1o Месяц назад

    This is a brilliant video!!!!!!!! I almost addressed all the questions I have about score matching and how it is related to diffusion model.

  • @김학규-q2p
    @김학규-q2p Месяц назад

    thanks, thanks, thanks! you finally gave me missing explanations in those diffusion papers!

  • @DongyeopKang-w3o
    @DongyeopKang-w3o Месяц назад

    Hi. Thank you so much for providing this incredibly great video. I've found this to be the best resource for understanding the derivation of score functions. I would love to see you cover model-based diffusion as your next topic!

  • @nicolasdufour315
    @nicolasdufour315 Месяц назад +3

    Great video! Would be great to see a video on flow matching in the same style!

    • @outliier
      @outliier  Месяц назад +4

      @@nicolasdufour315 That actually is my plan to do for the next video haha

    • @MrMIB983
      @MrMIB983 Месяц назад

      ​@@outliierI really want that video bro, awesome job!

  • @naterthot
    @naterthot 22 дня назад

    Excellent explanation, thank you for making this.

  • @chocobelly
    @chocobelly Месяц назад

    The mathematical derivation and explanation is such a lifesaver, I also never really understood the underlying meaning when reading the diffusion models but now everything clicked. Thank you so much for the videos, really enjoyed it. Please make more of such videos. Liked and subscribed : ).

  • @erfanasgari21
    @erfanasgari21 10 дней назад

    Thank you for this amazing explanation! keep going...

  • @pedrambazrafshan9598
    @pedrambazrafshan9598 Месяц назад

    This is a great video explaining in depth. Really enjoyed it. Would it also be possible for you to make implementation videos as well, like what you did for DDPM? Particularly, I am interested in videos explaining how to condition DDPM, for example, in engineering domain that requires the model to be conditioned with physics.

  • @francescodesantis3023
    @francescodesantis3023 Месяц назад

    A full series in generative diffusion models would be awesome

  • @outliier
    @outliier  Месяц назад

    32:38 To correct myself here, the paper gives explanation how to derive the sampler. I personally just find that approach much harder to understand and generally the papers don’t go into too much details for their derivations.

  • @gajendersharma417
    @gajendersharma417 Месяц назад

    Thankyou so much for making this video ! hatsoff to this elegant explanation!

  • @HamedAjorlou
    @HamedAjorlou 19 дней назад

    Thank you so much for such an informative video

  • @Eisneim1
    @Eisneim1 22 дня назад

    thank you for such great video! i would definitely want more video like this and more with code! using pytorch to implement equations!

  • @laurenznagler7405
    @laurenznagler7405 Месяц назад

    Very nice introduction to the topic!

  • @tell2rain
    @tell2rain Месяц назад

    excellent work done by you, thanks for your explaining!

  • @talhaahmed6488
    @talhaahmed6488 Месяц назад

    What an amazing video! I did not expect the video to contain the derivations which I have personally struggled to search for. If its not too much, can you do a pytorch implementation of VP-SDE or SDE - DDPM/DDIM? Your previous video of DDPM in Pytorch was extremely useful and would appreciate it if a similar video for this is possible. Finally, love the work you put in this. This channel is a gem for AI enthusiasts.

    • @outliier
      @outliier  Месяц назад

      @@talhaahmed6488 thank you so much for the nice comment! I will do an implementation video after the next one!

  • @joshp8820
    @joshp8820 Месяц назад

    youtube giving good content??? i’ve been looking for exactly this lmao, thanks for your work

  • @ihmejakki2731
    @ihmejakki2731 Месяц назад

    Every time you say theta I hear feta. Very nice video.

    • @outliier
      @outliier  Месяц назад

      @@ihmejakki2731 bon appetit

  • @boydkane5469
    @boydkane5469 Месяц назад

    Had an epiphany watching you explain so many things that I never fully grilled, thank you so much

  • @guillermogarciamanjarrez8934
    @guillermogarciamanjarrez8934 Месяц назад

    more videos on diffusion models would be great

  • @leerichard5542
    @leerichard5542 Месяц назад

    u finally come back! love ur video 🎉

  • @DenisShiryaev
    @DenisShiryaev Месяц назад

    Thank you for the video, love it!

  • @vinc6966
    @vinc6966 Месяц назад

    Really nice explanation, intuitive but also math oriented. Now I am looking forward for implementation

    • @outliier
      @outliier  Месяц назад +1

      @@vinc6966 My plan is to do Flow Matching next and then an implementation tutorial :)

    • @vinc6966
      @vinc6966 Месяц назад +1

      @@outliier ah yes, GANs, diffusion, score-based models, and flow matching, the four horsemen of generative AI, keep up the good work! :))

    • @Тима-щ2ю
      @Тима-щ2ю Месяц назад +1

      @@outliier Yeah, Flow Matching sounds interesting. There are not a lot of explanations in the internet. implementation tutorial is also very cool

  • @TheCrmagic
    @TheCrmagic 25 дней назад

    This is a staggering amount of work, do you have a patreon where you can be supported?

  • @RadientAI
    @RadientAI Месяц назад

    I haven't seen it yet, but pretty sure is an awesome video. Keep it up man!

  • @alenqquin4509
    @alenqquin4509 Месяц назад

    nice video for diffusion models!

  • @alexhamel743
    @alexhamel743 21 день назад

    great video man! thank you so much

  • @kirin7428
    @kirin7428 29 дней назад

    Suuuuuuper Helpful!

  • @lorenzovannini82
    @lorenzovannini82 Месяц назад

    Thank you so much. Wonderful Wonderful Wonderful

  • @swaystar1235
    @swaystar1235 Месяц назад

    Id love to see a video on training video models cheaply like you did for image models with wurchsten

    • @outliier
      @outliier  Месяц назад

      @@swaystar1235 Unfortunately even doing Würstchen style video models is still super expensive and there are many things that you have to solve first outside the model :/

  • @hahiZY
    @hahiZY Месяц назад

    thank you for the awesome video!!

  • @00osmboy
    @00osmboy Месяц назад

    great work

  • @dmitriizhilenkov2673
    @dmitriizhilenkov2673 Месяц назад

    Wow! Great job. Many thanks for sharing =)

  • @tell2rain
    @tell2rain Месяц назад +2

    7:35 i have a question, the second line -Ep(x)[
    abla_x s_theta(x)] = -\int p(x)
    abla_x s_theta(x) dx, but you wrote a positive sign?

    • @Topakhok
      @Topakhok Месяц назад +2

      There was another mistake with a sign, which cancels this one out. He was wrong with a sign after integrating by parts (after that it should have changed and be plus instead of minus)

  • @anumanchi1
    @anumanchi1 Месяц назад

    Can you make an implementation video for Score SDE's ?

  • @hanzhiyin5239
    @hanzhiyin5239 Месяц назад

    Thanks for your hard work! Amazing explanation! Just want to check the squared equation at 5:55. Can you explain why $\mathbb{E}[p(x)] = \int p(x) dx$? I feel like the equation has something missing...

  • @thivuxhale
    @thivuxhale 17 дней назад

    8:11 when gradient of s_{\theta}(x) = 0, x can be a local maximum or minimum, why do you think it's a local maximum and not minimum?
    11:45 summary
    33:58 summary again

  • @AnanthRachakonda
    @AnanthRachakonda Месяц назад

    This is epic!

  • @venkatbalachandra5965
    @venkatbalachandra5965 Месяц назад

    If you want to make videos with quicker production, maybe you could use a whitescreen and write everything out, so you can still explain it intuitively but quicker.

  • @waynenilsen3422
    @waynenilsen3422 Месяц назад

    i know its a short video but some of the syntax may be confusing eg the subscript on the \mathbb{E} that is p(x) in a financial context we often use things such as \mathbb{E}_t [ h(X_T) ] = the conditional probability of h(X_T) where X is a stochastic process creating a filtration such as so it is equal to \mathbb{E} [ h(X_T) | \mathcal{F}_t ]
    I know its a totally different domains but oftentimes notation like this can be dripping with meaning, so, what is the _meaning_ of the subscript p(x) and what is the _meaning_ of the double bar ( ||_2^2 ) in the expectation ? is that the L2 Norm? timestamp 8:17

  • @NoahElRhandour
    @NoahElRhandour Месяц назад

    schön, dich mal wieder zu sehen \o/

    • @outliier
      @outliier  Месяц назад

      @@NoahElRhandour hehe

  • @nanjiang2738
    @nanjiang2738 Месяц назад

    awesome!

  • @XinzeLi-j7h
    @XinzeLi-j7h 11 дней назад

    Excellent video! I'm kind of stuck at a step at time 33:05. Could you please explain why the score function equals a constant times s_theta? (I can get it from the video that s_theta should follow the direction of log probability, but I don't know why the constant is 1 over square root 1-\bar{alpha}_t.)

    • @XinzeLi-j7h
      @XinzeLi-j7h 11 дней назад

      I actually encountered this equation several times when reading papers, like in the famous Song Yang 2020 paper. But they seems to just take it for granted, which is not so apparent for me.

    • @outliier
      @outliier  11 дней назад +1

      @@XinzeLi-j7h I think it is an approximation you have to do in order to view DDPM this way. Like you know how the DDPM update looks and by rearranging terms to get there this is the only thing possible. Not a good answer, but do you get the idea?

    • @XinzeLi-j7h
      @XinzeLi-j7h 11 дней назад

      @@outliier I guess I understand what you mean. I will try the derivation later. Thank you very much!

  • @harikrishnametta8549
    @harikrishnametta8549 18 дней назад

    good video!!!

  • @Coding-for-startups
    @Coding-for-startups Месяц назад

    What about story visualization video?

  • @高鑫-i2r
    @高鑫-i2r Месяц назад

    It appears that the minus sign in the integration by parts was mistakenly written as a plus

  • @NYExplains
    @NYExplains Месяц назад

    can you give the source for the math ? i want to try a hands - on approach

    • @outliier
      @outliier  Месяц назад

      Take a look at the papers I linked. The math in the video is taken from all of them together, however some of the things are not really found anywhere in them unfortunately. So this took a while

  • @tejomaypadole4392
    @tejomaypadole4392 Месяц назад +5

    Bro also explained why - (a - b) = (b - a) 😂😂

    • @outliier
      @outliier  Месяц назад

      @@tejomaypadole4392 no details left out haha

  • @SY-fb7yc
    @SY-fb7yc Месяц назад

    Can you explain more about classifier free guidance code implementation during training? 😂

  • @SY-fb7yc
    @SY-fb7yc Месяц назад

    Love the music background, very relaxing when learning, pls don’t change! Thx!

  • @NikolajKuntner
    @NikolajKuntner Месяц назад

    thx

  • @vimukthirandika872
    @vimukthirandika872 28 дней назад

  • @oguzhanercan4701
    @oguzhanercan4701 Месяц назад

    I wonder that, for a year, did you studied on this, only? Because I really wonder that being able to go this much deep takes a year?

    • @outliier
      @outliier  Месяц назад +1

      @@oguzhanercan4701 no I was just doing bunch of other things too and didn‘t spend so much time always on the video.

    • @oguzhanercan4701
      @oguzhanercan4701 Месяц назад

      @@outliier To ask more clearly, have you been working on the basics of score matching and diffusion models for the last year? Assuming that you are using diffusion models at Luma, you also studied advanced topics on the related subject.

    • @outliier
      @outliier  Месяц назад

      @@oguzhanercan4701 yea I have been mostly working with diffusion models over the last 2 years

  • @NikolajKuntner
    @NikolajKuntner Месяц назад

    Calling ∇s stretches terminology a bit, right? Given s is a gradient vector field itself.
    Cool effort, thanks for going through all the manipulations. As for designing a read thread for the video, I'm not sure fully sure why you work 10 minutes for the E[s^2]+... term, but then in the explained denoising approach it's not really showing up anymore.
    Last note: Unlike Lagrang-ian dynamics, Langevin dynamics is not Langev-ian dynamics. But I think Langevin is still on the easier side to pronounce - don't be afraid.

  • @denisfitzpatrick6781
    @denisfitzpatrick6781 Месяц назад

    Music is unhelpful and distracting.

  • @madrooky1398
    @madrooky1398 Месяц назад +22

    Please don't do piano background it is super annoying and distracting. Thanks

    • @outliier
      @outliier  Месяц назад +8

      @@madrooky1398 interesting. I found it much more comforting and giving 3B1B vibes. Will consider

    • @amortalbeing
      @amortalbeing Месяц назад +2

      @@outliier I second this. but also you've done a wonderful job.

    • @outliier
      @outliier  Месяц назад +2

      @@amortalbeing thanks for the feedback. Should do a poll at some point I guess

    • @DonCat-sc3qo
      @DonCat-sc3qo Месяц назад +4

      +1 , the piano music is distracting. If one likes it, he can overlay it himself.

    • @valentinfunk202
      @valentinfunk202 Месяц назад +2

      FWIW I liked the piano because it calms me down when I get frustrated from not understanding a step 😃

  • @Suro_One
    @Suro_One Месяц назад

    This technology is obnoxiously abstracted beyond usefulness. The mathematical approach is also likely flawed and misses nuance. AMI is better.

    • @outliier
      @outliier  Месяц назад

      @@Suro_One what is AMI?