HackerPapers

arXiv:2202.05798cs.LG

The Dual Form of Neural Networks Revisited: Connecting Test Time Predictions to Training Patterns via Spotlights of Attention

Kazuki Irie, Róbert Csordás, Jürgen Schmidhuber

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

Linear layers in neural networks (NNs) trained by gradient descent can be expressed as a key-value memory system which stores all training datapoints and the initial weights, and produces outputs using unnormalised dot attention over the entire training experience. While this has been technically known since the 1960s, no prior work has effectively studied the operations of NNs in such a form, presumably due to prohibitive time and space complexities and impractical model sizes, all of them growing linearly with the number of training patterns which may get very large. However, this dual formulation offers a possibility of directly visualising how an NN makes use of training patterns at test time, by examining the corresponding attention weights. We conduct experiments on small scale supervised image classification tasks in single-task, multi-task, and continual learning settings, as well as language modelling, and discuss potentials and limits of this view for better understanding and interpreting how NNs exploit training patterns. Our code is public.

arXiv comments
Two first authors. Accepted to ICML 2022
Journal reference
DOI
Subjects
cs.LGMachine Learning

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from May 2023 to May 2023. Found in 1 HN submission from Jul 2022 to Jul 2022. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • Additional ones that come to mind now are: Transformer Feed-Forward Layers Are Key-Value Memories https://arxiv.org/abs/2012.14913 The Dual Form of Neural Networks Revisited: Connecting Test Time Predictions to Training Patterns via Spotlights of Attention…

      jayalammarView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.