Close Menu
geekfence.comgeekfence.com
    What's Hot

    Enterprise Network Trends & Strategy: WAN Manager Survey Insights

    March 28, 2026

    Posit AI Blog: De-noising Diffusion with torch

    March 28, 2026

    The Path to Agentic-Ready Data: Takeaways from the Gartner Data & Analytics Summit

    March 28, 2026
    Facebook X (Twitter) Instagram
    • About Us
    • Contact Us
    Facebook Instagram
    geekfence.comgeekfence.com
    • Home
    • UK Tech News
    • AI
    • Big Data
    • Cyber Security
      • Cloud Computing
      • iOS Development
    • IoT
    • Mobile
    • Software
      • Software Development
      • Software Engineering
    • Technology
      • Green Technology
      • Nanotechnology
    • Telecom
    geekfence.comgeekfence.com
    Home»Artificial Intelligence»Posit AI Blog: De-noising Diffusion with torch
    Artificial Intelligence

    Posit AI Blog: De-noising Diffusion with torch

    AdminBy AdminMarch 28, 2026No Comments7 Mins Read0 Views
    Facebook Twitter Pinterest LinkedIn Telegram Tumblr Email
    Posit AI Blog: De-noising Diffusion with torch
    Share
    Facebook Twitter LinkedIn Pinterest Email


    A Preamble, sort of

    As we’re writing this – it’s April, 2023 – it is hard to overstate
    the attention going to, the hopes associated with, and the fears
    surrounding deep-learning-powered image and text generation. Impacts on
    society, politics, and human well-being deserve more than a short,
    dutiful paragraph. We thus defer appropriate treatment of this topic to
    dedicated publications, and would just like to say one thing: The more
    you know, the better; the less you’ll be impressed by over-simplifying,
    context-neglecting statements made by public figures; the easier it will
    be for you to take your own stance on the subject. That said, we begin.

    In this post, we introduce an R torch implementation of De-noising
    Diffusion Implicit Models
    (J. Song, Meng, and Ermon (2020)). The code is on
    GitHub, and comes with
    an extensive README detailing everything from mathematical underpinnings
    via implementation choices and code organization to model training and
    sample generation. Here, we give a high-level overview, situating the
    algorithm in the broader context of generative deep learning. Please
    feel free to consult the README for any details you’re particularly
    interested in!

    Diffusion models in context: Generative deep learning

    In generative deep learning, models are trained to generate new
    exemplars that could likely come from some familiar distribution: the
    distribution of landscape images, say, or Polish verse. While diffusion
    is all the hype now, the last decade had much attention go to other
    approaches, or families of approaches. Let’s quickly enumerate some of
    the most talked-about, and give a quick characterization.

    First, diffusion models themselves. Diffusion, the general term,
    designates entities (molecules, for example) spreading from areas of
    higher concentration to lower-concentration ones, thereby increasing
    entropy. In other words, information is
    lost
    . In diffusion models, this information loss is intentional: In a
    “forward” process, a sample is taken and successively transformed into
    (Gaussian, usually) noise. A “reverse” process then is supposed to take
    an instance of noise, and sequentially de-noise it until it looks like
    it came from the original distribution. For sure, though, we can’t
    reverse the arrow of time? No, and that’s where deep learning comes in:
    During the forward process, the network learns what needs to be done for
    “reversal.”

    A totally different idea underlies what happens in GANs, Generative
    Adversarial Networks
    . In a GAN we have two agents at play, each trying
    to outsmart the other. One tries to generate samples that look as
    realistic as could be; the other sets its energy into spotting the
    fakes. Ideally, they both get better over time, resulting in the desired
    output (as well as a “regulator” who is not bad, but always a step
    behind).

    Then, there’s VAEs: Variational Autoencoders. In a VAE, like in a
    GAN, there are two networks (an encoder and a decoder, this time).
    However, instead of having each strive to minimize their own cost
    function, training is subject to a single – though composite – loss.
    One component makes sure that reconstructed samples closely resemble the
    input; the other, that the latent code confirms to pre-imposed
    constraints.

    Lastly, let us mention flows (although these tend to be used for a
    different purpose, see next section). A flow is a sequence of
    differentiable, invertible mappings from data to some “nice”
    distribution, nice meaning “something we can easily sample, or obtain a
    likelihood from.” With flows, like with diffusion, learning happens
    during the forward stage. Invertibility, as well as differentiability,
    then assure that we can go back to the input distribution we started
    with.

    Before we dive into diffusion, we sketch – very informally – some
    aspects to consider when mentally mapping the space of generative
    models.

    Generative models: If you wanted to draw a mind map…

    Above, I’ve given rather technical characterizations of the different
    approaches: What is the overall setup, what do we optimize for…
    Staying on the technical side, we could look at established
    categorizations such as likelihood-based vs. not-likelihood-based
    models. Likelihood-based models directly parameterize the data
    distribution; the parameters are then fitted by maximizing the
    likelihood of the data under the model. From the above-listed
    architectures, this is the case with VAEs and flows; it is not with
    GANs.

    But we can also take a different perspective – that of purpose.
    Firstly, are we interested in representation learning? That is, would we
    like to condense the space of samples into a sparser one, one that
    exposes underlying features and gives hints at useful categorization? If
    so, VAEs are the classical candidates to look at.

    Alternatively, are we mainly interested in generation, and would like to
    synthesize samples corresponding to different levels of coarse-graining?
    Then diffusion algorithms are a good choice. It has been shown that

    […] representations learnt using different noise levels tend to
    correspond to different scales of features: the higher the noise
    level, the larger-scale the features that are captured.

    As a final example, what if we aren’t interested in synthesis, but would
    like to assess if a given piece of data could likely be part of some
    distribution? If so, flows might be an option.

    Zooming in: Diffusion models

    Just like about every deep-learning architecture, diffusion models
    constitute a heterogeneous family. Here, let us just name a few of the
    most en-vogue members.

    When, above, we said that the idea of diffusion models was to
    sequentially transform an input into noise, then sequentially de-noise
    it again, we left open how that transformation is operationalized. This,
    in fact, is one area where rivaling approaches tend to differ.
    Y. Song et al. (2020), for example, make use of a a stochastic differential
    equation (SDE) that maintains the desired distribution during the
    information-destroying forward phase. In stark contrast, other
    approaches, inspired by Ho, Jain, and Abbeel (2020), rely on Markov chains to realize state
    transitions. The variant introduced here – J. Song, Meng, and Ermon (2020) – keeps the same
    spirit, but improves on efficiency.

    Our implementation – overview

    The README provides a
    very thorough introduction, covering (almost) everything from
    theoretical background via implementation details to training procedure
    and tuning. Here, we just outline a few basic facts.

    As already hinted at above, all the work happens during the forward
    stage. The network takes two inputs, the images as well as information
    about the signal-to-noise ratio to be applied at every step in the
    corruption process. That information may be encoded in various ways,
    and is then embedded, in some form, into a higher-dimensional space more
    conducive to learning. Here is how that could look, for two different types of scheduling/embedding:

    One below the other, two sequences where the original flower image gets transformed into noise at differing speed.

    Architecture-wise, inputs as well as intended outputs being images, the
    main workhorse is a U-Net. It forms part of a top-level model that, for
    each input image, creates corrupted versions, corresponding to the noise
    rates requested, and runs the U-Net on them. From what is returned, it
    tries to deduce the noise level that was governing each instance.
    Training then consists in getting those estimates to improve.

    Model trained, the reverse process – image generation – is
    straightforward: It consists in recursive de-noising according to the
    (known) noise rate schedule. All in all, the complete process then might look like this:

    Step-wise transformation of a flower blossom into noise (row 1) and back.

    Wrapping up, this post, by itself, is really just an invitation. To
    find out more, check out the GitHub
    repository
    . Should you
    need additional motivation to do so, here are some flower images.

    A 6x8 arrangement of flower blossoms.

    Thanks for reading!

    Dieleman, Sander. 2022. “Diffusion Models Are Autoencoders.” https://benanne.github.io/2022/01/31/diffusion.html.
    Ho, Jonathan, Ajay Jain, and Pieter Abbeel. 2020. “Denoising Diffusion Probabilistic Models.” https://doi.org/10.48550/ARXIV.2006.11239.
    Song, Jiaming, Chenlin Meng, and Stefano Ermon. 2020. “Denoising Diffusion Implicit Models.” https://doi.org/10.48550/ARXIV.2010.02502.
    Song, Yang, Jascha Sohl-Dickstein, Diederik P. Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. 2020. “Score-Based Generative Modeling Through Stochastic Differential Equations.” CoRR abs/2011.13456. https://arxiv.org/abs/2011.13456.

    Enjoy this blog? Get notified of new posts by email:

    Posts also available at r-bloggers



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

    Related Posts

    Here’s why some people choose cryonics to store their bodies and brains after death

    March 27, 2026

    Spotting and Avoiding ROT in Your Agentic AI – O’Reilly

    March 26, 2026

    Redefining AI efficiency with extreme compression

    March 25, 2026

    Identifying Interactions at Scale for LLMs – The Berkeley Artificial Intelligence Research Blog

    March 24, 2026

    Xbox Partner Preview: Join Us on Thursday to See What’s Next from Our Third-Party Partners

    March 23, 2026

    What’s the right path for AI? | MIT News

    March 22, 2026
    Top Posts

    Understanding U-Net Architecture in Deep Learning

    November 25, 202527 Views

    Hard-braking events as indicators of road segment crash risk

    January 14, 202624 Views

    Redefining AI efficiency with extreme compression

    March 25, 202618 Views
    Don't Miss

    Enterprise Network Trends & Strategy: WAN Manager Survey Insights

    March 28, 2026

    Since 2018, we’ve been tracking the evolving nature of corporate enterprise networks through our WAN…

    Posit AI Blog: De-noising Diffusion with torch

    March 28, 2026

    The Path to Agentic-Ready Data: Takeaways from the Gartner Data & Analytics Summit

    March 28, 2026

    Iran war: John Bolton on why even he’s against Trump’s campaign.

    March 28, 2026
    Stay In Touch
    • Facebook
    • Instagram
    About Us

    At GeekFence, we are a team of tech-enthusiasts, industry watchers and content creators who believe that technology isn’t just about gadgets—it’s about how innovation transforms our lives, work and society. We’ve come together to build a place where readers, thinkers and industry insiders can converge to explore what’s next in tech.

    Our Picks

    Enterprise Network Trends & Strategy: WAN Manager Survey Insights

    March 28, 2026

    Posit AI Blog: De-noising Diffusion with torch

    March 28, 2026

    Subscribe to Updates

    Please enable JavaScript in your browser to complete this form.
    Loading
    • About Us
    • Contact Us
    • Disclaimer
    • Privacy Policy
    • Terms and Conditions
    © 2026 Geekfence.All Rigt Reserved.

    Type above and press Enter to search. Press Esc to cancel.