Fully Spiking Denoising Diffusion Implicit Models

Ryo Watanabe, Yusuke Mukuta, Tatsuya HaradaarXiv 2023

Abstract

Spiking neural networks (SNNs) have garnered considerable attention owing to their ability to run on neuromorphic devices with super-high speeds and remarkable energy efficiencies. SNNs can be used in conventional neural network-based time- and energy-consuming applications. However, research on generative models within SNNs remains limited, despite their advantages. In particular, diffusion models are a powerful class of generative models, whose image generation quality surpass that of the other generative models, such as GANs. However, diffusion models are characterized by high computational costs and long inference times owing to their iterative denoising feature. Therefore, we propose a novel approach fully spiking denoising diffusion implicit model (FSDDIM) to construct a diffusion model within SNNs and leverage the high speed and low energy consumption features of SNNs via synaptic current learning (SCL). SCL fills the gap in that diffusion models use a neural network to estimate real-valued parameters of a predefined probabilistic distribution, whereas SNNs output binary spike trains. The SCL enables us to complete the entire generative process of diffusion models exclusively using SNNs. We demonstrate that the proposed method outperforms the state-of-the-art fully spiking generative model.

Introduction

Diffusion models, such as DALL-E and Midjourney, represent the state-of-the-art in image generation. However, their iterative denoising process is computationally expensive, requiring numerous steps of complex floating-point operations. Spiking Neural Networks (SNNs), inspired by biological brains, offer a promising alternative due to their event-driven nature and energy efficiency on neuromorphic hardware.

The primary challenge in integrating SNNs with diffusion models lies in the data representation. Diffusion models require predicting continuous, real-valued parameters (e.g., Gaussian noise), whereas SNNs communicate via discrete binary spikes. Previous "Spiking Diffusion" attempts suffered from a significant "decode-encode" bottleneck: at every denoising step, spikes had to be decoded into real numbers for mathematical operations and then re-encoded into spikes for the next SNN layer.

The "decode-encode" bottleneck in previous spiking diffusion models.

Methods: Fully Spiking Denoising Diffusion Implicit Models (FSDDIM)

To overcome these limitations, the authors introduce FSDDIM, a framework that maintains a fully spiking workflow. This is achieved through two key components:

  1. Deterministic Denoising (DDIM): Unlike standard probabilistic diffusion models (DDPM), FSDDIM utilizes the Denoising Diffusion Implicit Model (DDIM) framework. DDIM is deterministic, allowing the next denoising step to be calculated as a linear combination of the current state and the network's output.
  2. Synaptic Current Learning (SCL): This novel technique allows the model to bypass the binary spike limitation. Instead of training on final spike outputs, the network learns based on synaptic currents—the continuous signals that accumulate within neurons. By leveraging the linearity of certain encoding/decoding functions, the authors demonstrated that the necessary diffusion mathematics can be performed directly within the synaptic current space.
FSDDIM architecture using synaptic currents for input/output, enabling a fully spiking process.

The underlying architecture is a Spiking U-Net composed of Leaky Integrate-and-Fire (LIF) neurons and threshold-dependent Batch Normalization (tdBN).

Experimental Evaluation

The model was benchmarked on four datasets: MNIST, Fashion MNIST, CIFAR10, and CelebA (64x64).

Key Results

  • Generative Quality: FSDDIM significantly outperforms previous state-of-the-art fully spiking models like FSVAE. For instance, on the MNIST dataset, FSDDIM achieved a Frechet Inception Distance (FID) of 3.99, a massive improvement over FSVAE's 57.77.
  • Efficiency: Compared to an equivalent Artificial Neural Network (ANN) architecture, a 4-step FSDDIM reduced multiplications by 74.1%. In SNNs, these are replaced by energy-efficient additions.
  • Inference Speed: FSDDIM achieves high-quality results with fewer diffusion steps (S=4 or 8) compared to earlier models, reducing overall latency.

Discussion and Future Work

FSDDIM demonstrates that diffusion models can be effectively implemented within the spiking paradigm without sacrificing generative quality for efficiency. By treating synaptic currents as the primary information carrier, the model bridges the gap between continuous diffusion mathematics and discrete spiking hardware.

While the theoretical gains are substantial, future work is needed to deploy these models on physical neuromorphic chips like Intel’s Loihi to realize their full speed potential. Additionally, scaling the architecture to handle higher-resolution images remains an open challenge due to the memory overhead of spike train maintenance.

Summary updated

BibTeX
@misc{watanabe2023fully,
  author = {Ryo Watanabe and Yusuke Mukuta and Tatsuya Harada},
  title = {{Fully Spiking Denoising Diffusion Implicit Models}},
  year = {2023},
  eprint = {2312.01742},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.01742},
}
Figure