IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v12y2024i19p3153-d1494788.html
   My bibliography  Save this article

Out-of-Distribution Detection with Memory-Augmented Variational Autoencoder

Author

Listed:
  • Faezeh Ataeiasad

    (School of Computer Science and Informatics, De Montfort University, The Gateway, Leicester LE1 9BH, UK)

  • David Elizondo

    (School of Computer Science and Informatics, De Montfort University, The Gateway, Leicester LE1 9BH, UK)

  • Saúl Calderón Ramírez

    (School of Computer Engineering, Costa Rica Institute of Technology (ITCR), Cartago 30109, Costa Rica)

  • Sarah Greenfield

    (School of Computer Science and Informatics, De Montfort University, The Gateway, Leicester LE1 9BH, UK)

  • Lipika Deka

    (School of Computer Science and Informatics, De Montfort University, The Gateway, Leicester LE1 9BH, UK)

Abstract

This paper proposes a novel method capable of both detecting OOD data and generating in-distribution data samples. To achieve this, a VAE model is adopted and augmented with a memory module, providing capacities for identifying OOD data and synthesising new in-distribution samples. The proposed VAE is trained on normal data and the memory stores prototypical patterns of the normal data distribution. At test time, the input is encoded by the VAE encoder; this encoding is used as a query to retrieve related memory items, which are then integrated with the input encoding and passed to the decoder for reconstruction. Normal samples reconstruct well and yield low reconstruction errors, while OOD inputs produce high reconstruction errors as their encodings get replaced by retrieved normal patterns. Prior works use memory modules for OOD detection with autoencoders, but this method leverages a VAE architecture to enable generation abilities. Experiments conducted with CIFAR-10 and MNIST datasets show that the memory-augmented VAE consistently outperforms the baseline, particularly where OOD data resembles normal patterns. This notable improvement is due to the enhanced latent space representation provided by the VAE. Overall, the memory-equipped VAE framework excels in identifying OOD and generating creative examples effectively.

Suggested Citation

  • Faezeh Ataeiasad & David Elizondo & Saúl Calderón Ramírez & Sarah Greenfield & Lipika Deka, 2024. "Out-of-Distribution Detection with Memory-Augmented Variational Autoencoder," Mathematics, MDPI, vol. 12(19), pages 1-16, October.
  • Handle: RePEc:gam:jmathe:v:12:y:2024:i:19:p:3153-:d:1494788
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/12/19/3153/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/12/19/3153/
    Download Restriction: no
    ---><---

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jmathe:v:12:y:2024:i:19:p:3153-:d:1494788. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.