Attention Neural Net Model Fundamentals

Attention Neural Net Model Fundamentals

Neural networks have regained popularity over the last decade because they are demonstrating real world value in different applications (e.g. targeted advertising, recommender engines, Siri, self driving cars, facial recognition). Several model types are currently explored in the field with recurrent neural networks (RNN) and convolution neural networks (CNN) taking the top focus. The attention model, a recently developed RNN variant, has started to play a larger role in both natural language processing and image analysis research.

This talk will cover the fundamentals of the attention model structure and how its applied to visual and speech analysis. I will provide an overview of the model functionality and math including a high-level differentiation between soft and hard types. The goal is to give you enough of an understanding of what the model is, how it works and where to apply it.


Melanie Warrick

November 12, 2015


  1. Attention Models Melanie Warrick @nyghtowl

  2. @nyghtowl Overview - Attention - Soft vs Hard - Hard

    Attention for Computer Vision - Learning Rule - Example Performance
  3. @nyghtowl Attention ~ Selective

  4. @nyghtowl Attention Mechanism input focus sequential | context weights

  5. @nyghtowl Zoom-lens adds changing filter size Attention Techniques Spotlight varying

  6. @nyghtowl Where to look? Attention Decision

  7. @nyghtowl Soft - read all input & weighted average of

    all expected output - standard loss derivative Hard - samples input & weighted average of estimated output - policy gradient & variance reduction Model Types
  8. @nyghtowl Soft vs Hard Focus Examples Soft Hard

  9. @nyghtowl Soft Attention Value Challenge scale limitations CONTEXT AWARE

  10. @nyghtowl Value data size # computations Challenge context & training

    time Hard Attention
  11. @nyghtowl Model Variations Soft - NTM Neural Turing Machine -

    Memory Network - DRAW Deep Recurrent Attention Writer (“Differentiable”) - Stacked-Augmented Recurrent Nets Hard - RAM Recurrent Attention Model - DRAM Deep Recurrent Attention Model - RL-NTM Reinforce Neural Turing Machine
  12. @nyghtowl - Memory - Reading / Writing - Language generation

    - Picture generation - Classifying image objects - Image search - Describing images / videos Applications
  13. @nyghtowl Hard Model & Computer Vision

  14. @nyghtowl Convolutional Neural Nets

  15. @nyghtowl Linear Complexity Growth

  16. @nyghtowl Constrained Computations

  17. @nyghtowl Recurrent Neural Nets

  18. @nyghtowl General Goal - min error | max reward -

    reward can be sparse & delayed
  19. @nyghtowl Deep Recurrent Attention Model

  20. @nyghtowl REINFORCE Learning Rule weight change = reward change given

  21. @nyghtowl Performance Comparison SVHN - Street View House Number data-set

  22. @nyghtowl Performance Comparison DRAM vs CNN - Computation Complexity

  23. @nyghtowl Last Points - adaptive selection & context - constrained

    computations - accuracy
  24. @nyghtowl • Neural Turing Machines (Graves et al., 2014)

    • Reinforcement Learning NTM (Zaremba et al., 2015) • End-To-End Memory Network (Sukhbaatar et al., 2015) • Recurrent Models of Visual Attention (Mnih et al., 2014) • Multiple Object Recognition with Visual Attention (Ba et al., 2014) • Show, Attend and Tell (Xu et al., 2015) • DRAW (Gregor et al., 2015) • Neural Machine Translation by Jointly Learning to Align and Translate 0473v6.pdf (Bahdanau et al., 2014) • Inferring Algorithmic Patterns with Stack-Augmented Recurrent Nets 01007v4.pdf (Joulin et al., 2015) • Deep Learning Theory & Applicaitons: • The Unreasonable Effectiveness of Recurrent Neural Networks https://karpathy.github. io/2015/05/21/rnn-effectiveness/ • Simple Statistical Gradient-Following Algorithms for Connectionist Reinforcement Learning http://www- (Williams, 1992) References
  25. @nyghtowl • Spatial Transformer Networks (Jaderberg et al., 2015)

    • Recurrent Spatial Transformer Networks (Sønderby et al., 2015) • Spatial Transformer Networks Video • Learning Stochastic Feedforward Neural Networks (Tang & Salakhutdinov, 2013) • Learning Stochastic Recurrent Networks (Bayer & Osendorfer 2015) • Learning Generative Models with Visual Attention (Tang et al., 2014) References
  26. @nyghtowl Special Thanks • Mark Ettinger • Rewon Child •

    Diogo Almeida • Stanislav Nikolov • Adam Gibson • Tarin Ziyaee • Charlie Tang • Dave Kammeyer
  27. @nyghtowl References: Images • • • convolutional-neural-networks-restricted-boltzma

    • marketing-strategy/ • • • • •
  28. @nyghtowl Attention Models Melanie Warrick (company)

  29. @nyghtowl Artificial Neural Nets Input Output Hidden Run until error

    stops improving = converge Loss Function Output k j X M kj W y