Table of Contents
Fetching ...

Forward-Forward Learning achieves Highly Selective Latent Representations for Out-of-Distribution Detection in Fully Spiking Neural Networks

Erik B. Terres-Escudero, Javier Del Ser, Aitor Martínez-Seras, Pablo Garcia-Bringas

TL;DR

This work explores the potential of the spiking Forward-Forward Algorithm (FFA) to address both Out-of-Distribution (OoD) detection and interpretability, and proposes a novel, gradient-free attribution method to detect features that drive a sample away from class distributions.

Abstract

In recent years, Artificial Intelligence (AI) models have achieved remarkable success across various domains, yet challenges persist in two critical areas: ensuring robustness against uncertain inputs and drastically increasing model efficiency during training and inference. Spiking Neural Networks (SNNs), inspired by biological systems, offer a promising avenue for overcoming these limitations. By operating in an event-driven manner, SNNs achieve low energy consumption and can naturally implement biological methods known for their high noise tolerance. In this work, we explore the potential of the spiking Forward-Forward Algorithm (FFA) to address these challenges, leveraging its representational properties for both Out-of-Distribution (OoD) detection and interpretability. To achieve this, we exploit the sparse and highly specialized neural latent space of FF networks to estimate the likelihood of a sample belonging to the training distribution. Additionally, we propose a novel, gradient-free attribution method to detect features that drive a sample away from class distributions, addressing the challenges posed by the lack of gradients in most visual interpretability methods for spiking models. We evaluate our OoD detection algorithm on well-known image datasets (e.g., Omniglot, Not-MNIST, CIFAR10), outperforming previous methods proposed in the recent literature for OoD detection in spiking networks. Furthermore, our attribution method precisely identifies salient OoD features, such as artifacts or missing regions, hence providing a visual explanatory interface for the user to understand why unknown inputs are identified as such by the proposed method.

Forward-Forward Learning achieves Highly Selective Latent Representations for Out-of-Distribution Detection in Fully Spiking Neural Networks

TL;DR

This work explores the potential of the spiking Forward-Forward Algorithm (FFA) to address both Out-of-Distribution (OoD) detection and interpretability, and proposes a novel, gradient-free attribution method to detect features that drive a sample away from class distributions.

Abstract

In recent years, Artificial Intelligence (AI) models have achieved remarkable success across various domains, yet challenges persist in two critical areas: ensuring robustness against uncertain inputs and drastically increasing model efficiency during training and inference. Spiking Neural Networks (SNNs), inspired by biological systems, offer a promising avenue for overcoming these limitations. By operating in an event-driven manner, SNNs achieve low energy consumption and can naturally implement biological methods known for their high noise tolerance. In this work, we explore the potential of the spiking Forward-Forward Algorithm (FFA) to address these challenges, leveraging its representational properties for both Out-of-Distribution (OoD) detection and interpretability. To achieve this, we exploit the sparse and highly specialized neural latent space of FF networks to estimate the likelihood of a sample belonging to the training distribution. Additionally, we propose a novel, gradient-free attribution method to detect features that drive a sample away from class distributions, addressing the challenges posed by the lack of gradients in most visual interpretability methods for spiking models. We evaluate our OoD detection algorithm on well-known image datasets (e.g., Omniglot, Not-MNIST, CIFAR10), outperforming previous methods proposed in the recent literature for OoD detection in spiking networks. Furthermore, our attribution method precisely identifies salient OoD features, such as artifacts or missing regions, hence providing a visual explanatory interface for the user to understand why unknown inputs are identified as such by the proposed method.
Paper Structure (33 sections, 15 equations, 6 figures, 4 tables, 2 algorithms)

This paper contains 33 sections, 15 equations, 6 figures, 4 tables, 2 algorithms.

Figures (6)

  • Figure 1: Diagram illustrating the architecture, from left to right, of Backpropagation (BP), Feedback Alignment lillicrap2016random, and Forward-Forward Algorithm (FFA) hinton2022forward. Each architecture highlights the input forward path (black arrows), and the error propagation path (blue arrows). Additionally, we describe the update mechanism of FFA and its spiking adaptations.
  • Figure 2: Visual diagram providing an example of a) the mechanics FF-OoD on an ID sample (green) and a OoD sample (red), with respect to the set of data from classes $1$ and $3$, and 2) the process of optimizing a latent vector (purple) so that when decoded, it can be compared with the original sample (the OoD sample) to obtain the atribution map to some specified class (Class 1).
  • Figure 3: MNIST and KMNIST ID samples followed by OoD version obtained by applying one obstruction method.
  • Figure 4: Batch of four visually modified samples from the MNIST and KMNIST datasets with their reconstructions and the corresponding attribution maps, featuring a distinct visual obstruction: a) Square; b) Gaussian; c ) StripeOff; d) StripeOn;e) Square; f) Gaussian; g) StripeOff; h) StripeOn.
  • Figure 5: Latent vectors of the first layer of 256 random samples ordered by class extracted from networks trained with FFA. Only the first 250 neurons are displayed.
  • ...and 1 more figures