Manuscript Offprint

arXiv:2610.27770

Engram Memory Network: Brain-Inspired Prototype Explanations

Hyunjun Kim, Myoung Hoon Ha

Hyunjun Kim

Department of Electrical and Computer Engineering

Seoul National University

Seoul, South Korea

doctor3390@snu.ac.kr

Myoung Hoon Ha ∗^{*}

Center for Neuroscience-inspired AI

KAIST

Daejeon, South Korea

mh.ha.soar@gmail.com

Abstract—Artificial intelligence systems are increasingly being deployed in high-stakes decision-making scenarios. In response, prototype-based models in explainable AI have attracted growing attention for their ability to retrieve visually similar examples as faithful explanations. Although these models achieve competitive classification accuracy, they often exhibit degraded explanation quality across datasets with varying characteristics, thereby limiting their practical applicability. To address this limitation, we draw on insights from cognitive neuroscience, particularly the human memory system, which encodes input-relevant information into representations that support recognition. In this paper, we propose an Engram Memory Network (EMN), a model that emulates the ventral visual stream and inferior temporal cortex in the human brain. Central to this model is a Hopfield-inspired memory module that iteratively retrieves representative prototypes. These memory-refined latents are used for both reconstruction and classification, encouraging the selected prototypes to capture input-relevant information across diverse datasets. To address the lack of standardized evaluation for prototype explanations, we assess three complementary aspects: perceptual similarity (LPIPS and DISTS) for perceived resemblance, subclass alignment, measuring whether prototypes match the input's fine-grained category beyond supervised labels, and information preservation (NMI), measuring how much input information is captured by selected prototypes. Experiments show that EMN improves visual similarity by 17.06%, subclass alignment by 104.57%, and NMI by 42.42% on average across CIFAR-10/100, MNIST, HAM10000, and CUB-200, while achieving the highest average classification accuracy (87.62%) among all methods. These findings underscore the effectiveness of neuroscience-inspired explanation mechanisms in advancing the interpretability and reliability of prototype-based models.

I. INTRODUCTION

Prototype-based explanation models [1], [2] have emerged as a central approach for explainable AI (XAI; [3]). They justify model predictions by retrieving examples that resemble the input. As deep learning extends beyond benchmark classification tasks to high-stakes domains such as medical diagnosis, autonomous driving, and financial decision-making [4], the demand for accurate and interpretable models has grown. In these applications, prototype-based methods hold particular promise, as they aim to provide explanations that are not only faithful but also intuitive and understandable to human users. While early methods suffered from limited predictive performance [5], [6], recent advances in model architecture and training strategies have substantially improved predictive accuracy [7], [8]. However, consistently achieving high-quality, human-understandable explanations across diverse datasets remains challenging [9].

The explanatory effectiveness of these models varies substantially across datasets. For instance, ProtoVAE [10] reconstructs prototypes from latent vectors and performs well on simple datasets such as MNIST [11], but often produces blurry, ambiguous outputs on more complex datasets such as CIFAR-10 [12]. In contrast, patch-based methods such as ProtoPNet [1] and ProtoViT [8] improve explainability by identifying localized regions of similarity between input and prototypes. These approaches are practical on datasets like CUB-200 [13], where object structures are well-defined and redundant across samples. However, when patch-level spatial correspondence between the input and prototypes is weak, as in CIFAR-10 [12], the selected prototypes may not align clearly with the input, ultimately undermining explanatory validity (See Figure 1).

In addition, metrics for evaluating whether prototypes are genuinely relevant to inputs remain underexplored [9]. We propose three complementary metrics: (i) visual similarity, measured by Learned Perceptual Image Patch Similarity (LPIPS [14]) and Deep Image Structure and Texture Similarity (DISTS [15]), for human-perceived resemblance; (ii) subclass alignment for fine-grained relevance, evaluated by training on superclass labels and measuring whether prototypes match withheld subclasses—critical in applications like medical diagnosis where within-class distinctions (e.g., cancer subtypes) determine explanation validity; and (iii) information preservation, measured by Normalized Mutual Information (NMI [16]) between input images and their selected prototypes, measuring how much input information prototypes capture.

To address the dataset-dependency problem, we draw on insights from the human visual system, where memory representations are believed to encode input-relevant information for recognition [17]. Accordingly, memories that contribute most to such representations may serve as valid explanations; this motivates our use of prototypes.

In this paper, we propose the Engram Memory Network

Presented at IJCNN 2026 (WCCI), Maastricht, Netherlands. *Corresponding author

ModelQuery APrototypes AQuery BPrototypes BQuery CPrototypes CQuery DPrototypes D
ProtoVAE
ProtoPNet
ProtoViT
ProtoPFormer
EMN (ours)

Fig. 1. Queries and selected prototypes by baselines (ProtoVAE [10], ProtoPNet [1], ProtoViT [8], ProtoPFormer [7]) and EMN (ours). Each row shows a model's top-3 retrieved prototypes for four representative queries (A–D); each Query column shows the input image and the three columns on the right shows its retrieved prototypes. In these examples, EMN retrieves prototypes that appear visually clearer and more class-consistent, consistent with the improved explanation metrics reported in Sec. IV.

(EMN), which integrates classification, reconstruction, and explanation. Specifically, EMN comprises three components: (i) an encoder that extracts visual features; (ii) an Engram Memory Module (EMM) that performs memory-based association via a modified update rule inspired by a continuous modern Hopfield network [18]; and (iii) a decoder that reconstructs the input. Visual and categorical latent vectors are iteratively refined through interaction with prototype memories. After refinement of the latent vectors, the model predicts the label, reconstructs the image, and selects the top-K activated prototypes for explanation. Furthermore, we introduce regularization that promotes prototype diversity and mitigates over-reliance on a narrow subset of prototypes. We empirically evaluate EMN on diverse benchmarks including CIFAR-10/100 [12], MNIST [11], HAM10000 [19], and CUB-200 [13]. On average across datasets, EMN improves visual similarity (LPIPS [14] and DISTS [15]) by 17.06% over ProtoPFormer [7] and information preservation (NMI [16]) by 42.42% over ProtoViT [8]. EMN achieves 104.57% higher subclass alignment over ProtoPFormer [7], demonstrating its ability to capture fine-grained semantic structure. For classification, EMN achieves the highest average accuracy (87.62%) among all compared methods, notably achieving the best performance on HAM10000 [19] (88.51%). Our further studies in Sec. IV-E and IV-F reveal an explicit accuracy-explanation trade-off: relaxing the separation loss and/or increasing the latent dimensionality improves accuracy (e.g., 97.37% on CIFAR-10 [12], surpassing most baselines) while moderately reducing explanation quality, which nonetheless remains superior to baseline; we adopt a default setting that prioritizes explanation quality over classification accuracy in this paper. These results suggest that EMN produces interpretable explanations grounded in memory-based association, achieving consistent performance across diverse datasets 1^{1}.

Our contributions are threefold:

  • Brain-Inspired Architecture: We present a model that structurally reflects biological memory recall, leveraging continuous modern Hopfield networks [18] to achieve robust explainability and maintained accuracy across diverse datasets with varying characteristics.

  • Novel Prototype Evaluation Protocol: We propose a comprehensive evaluation protocol that assesses visual similarity (LPIPS [14] and DISTS [15]), subclass alignment, and NMI [16].

  • Cross-dataset Explanatory Robustness: EMN yields consistently high-quality explanations across diverse datasets, at the cost of a modest decrease in classification accuracy.

References (36)

  • This looks like that: deep learning for interpretable image recognition
  • Ante-hoc methods for interpretable deep models: A survey
  • Prototype-based methods in explainable ai and emerging opportunities in the geosciences (opens arXiv in a new tab)
  • Stop explaining black-box machine learning models for high-stakes decisions and use interpretable models instead
  • Prototype selection for interpretable classification
  • Deep learning for case-based reasoning through prototypes
  • Protopformer: Concentrating on prototypical parts in vision transformers for interpretable image recognition
  • Interpretable image classification with adaptive prototype-based vision transformers (opens arXiv in a new tab)
  • From anecdotal evidence to quantitative evaluation methods: A systematic review on evaluating explainable AI
  • Protovae: A trustworthy self-explainable prototypical variational model
  • Mnist handwritten digit database
  • Learning multiple layers of features from tiny images
  • The caltech-ucsd birds-200-2011 dataset
  • The unreasonable effectiveness of deep features as a perceptual metric
  • Image quality assessment: Unifying structure and texture similarity
  • Transformative neural representations support long-term episodic memory
  • Hopfield networks is all you need (opens arXiv in a new tab)
  • The ham10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions
  • Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps
  • Grad-cam: Visual explanations from deep networks via gradient-based localization
  • Attention is not explanation
  • Towards robust interpretability with self-explaining neural networks
  • Interpretable image recognition by constructing transparent embedding space
  • Deformable protopnet: An interpretable image classifier using deformable prototypes
  • Distributed hierarchical processing in the primate cerebral cortex
  • How does the brain solve object recognition?
  • Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex
  • Evidence that recurrent circuits are critical to the ventral stream’s execution of core object recognition behavior
  • A Neuropsychological Theory
  • Finding the engram
  • An image is worth $16 \times 16$ words: Transformers for image recognition at scale
  • Training data-efficient image transformers & distillation through attention
  • Imagenet: A large-scale hierarchical image database
  • Decoupled weight decay regularization
  • Pytorch: An imperative style, high-performance deep learning library
  • Episodic and semantic memory