paper-with-me

Papers

LARNN: Linear Attention Recurrent Neural Network

2018-08-16 · Guillaume Chevalier

The Linear Attention Recurrent Neural Network (LARNN) is a recurrent attention module derived from the Long Short-Term Memory (LSTM) cell and ideas from the consciousness Recurrent Neural Network (RNN). Yes, it LARNNs. The LARNN uses attention on its past cell state values for a limited window size $k$. The formulas are also derived from the Batch Normalized LSTM (BN-LSTM) cell and the Transformer Network for its Multi-Head Attention Mechanism. The Multi-Head Attention Mechanism is used inside the cell such that it can query its own $k$ past values with the attention window. This has the effect of augmenting the rank of the tensor with the attention mechanism, such that the cell can perform complex queries to question its previous inner memories, which should augment the long short-term effect of the memory. With a clever trick, the LARNN cell with attention can be easily used inside a loop on the cell state, just like how any other Recurrent Neural Network (RNN) cell can be looped linearly through time series. This is due to the fact that its state, which is looped upon throughout time steps within time series, stores the inner states in a "first in, first out" queue which contains the $k$ most recent states and on which it is easily possible to add static positional encoding when the queue is represented as a tensor. This neural architecture yields better results than the vanilla LSTM cells. It can obtain results of 91.92% for the test accuracy, compared to the previously attained 91.65% using vanilla LSTM cells. Note that this is not to compare to other research, where up to 93.35% is obtained, but costly using 18 LSTM cells rather than with 2 to 3 cells as analyzed here. Finally, an interesting discovery is made, such that adding activation within the multi-head attention mechanism's linear layers can yield better results in the context researched hereto.

📄 PDF Abstract BibTeX arXiv:1808.05578

Code (1)

guillaume-chevalier/Linear-Attention-Recurrent-Neural-Network 공식 구현 pytorch

Tasks

Time SeriesTime Series Analysis

Methods 이 논문이 사용한 방법론

Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Position-Wise Feed-Forward Layer 설명 없음
Sigmoid Activation 설명 없음
Tanh Activation 설명 없음
Residual Connection 설명 없음
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…

Similar Papers 제목 키워드 기반

Linear Antisymmetric Recurrent Neural Networks

2020-06-08 · L4DC 2020 6 · Signe Moe, Filippo Remonato, Esten Ingar Grøtli, Jan Tommy Gravdahl

Recurrent Neural Networks (RNNs) have a form of memory where the output from a node at one timestep is fed back as input the next timestep in addition to data from the previous layer. This makes them highly suitable for …

On the Expressiveness of Softmax Attention: A Recurrent Neural Network Perspective

2025-07-31 · Gabriel Mongaras, Eric C. Larson arxiv

Since its introduction, softmax attention has become the backbone of modern transformer architectures due to its expressiveness and scalability across a wide range of tasks. However, the main drawback of softmax attentio…

Multi-Mixer Models: Flexible Sequence Modeling with Shared Representations

2026-05-27 · Kevin Y. Li, Asher Trockman, Ananda Theertha Suresh, Ziteng Sun arxiv

Softmax attention is the cornerstone of modern large language models, but its memory scales linearly and compute quadratically with sequence length. Linear recurrent models, such as linear attention and state space model…

Liger: Linearizing Large Language Models to Gated Recurrent Structures

2025-03-03 · Disen Lan, Weigao Sun, Jiaxi Hu, Jusen Du 외

Transformers with linear recurrent modeling offer linear-time training and constant-memory inference. Despite their demonstrated efficiency and performance, pretraining such non-standard architectures from scratch remain…

Tail-Replay: Escaping the Curse of Linear Attention in Prefix Caching for Hybrid LLMs

2026-08-31 · Yirui Liu, Ruoling Qi, Xuaner Wu, Penghang Liu 외 arxiv

Hybrid large language models interleave full-attention layers with linear-attention layers to reduce the cost of long-context inference. This structure complicates prefix caching: full-attention key-value caches are toke…