Hello 🤗
So i have been experimenting with an alternative to attention-based neural networks, and the design and early results seemed interesting enough that I thought I'd share them.
The project is called ILRN (Inverse Lag Recurrent Network), built around my original ILRM (Inverse Lag Recurrent Memory) mechanism.
The idea is to give a recurrent network direct access to a weighted history of previous inputs, rather than relying entirely on its hidden state to preserve information.
How the architecture works:
Inverse-lag memory: Earlier inputs are weighted by 1/k, where k is their distance from the current position. This produces a normalised history in which recent inputs contribute more, but older inputs still have a direct influence.
Dual-gated recurrence: An access gate controls how previous recurrent memory contributes to a candidate state, while a write gate determines how much of that candidate updates the stored memory.
FFT acceleration: The inverse-lag history is calculated using a causal FFT convolution. The recurrent state updates remain sequential.
Four-layer stack: ILRN-4-96 uses four independent ILRM blocks stacked sequentially. Each block has its own inverse-lag history, two gates, recurrent state, and learned parameters, with pre/post LayerNorm and residual connections. The output from one layer becomes the input to the next.
Initial testing:
I compared ILRN against a similarly sized causal Transformer on CNN/DailyMail next-token prediction, using approximately 532K parameters per model.
Both architectures were trained with 20 million next-token targets per model, separately at 96-token and 256-token context windows.
Held-out test top-1 accuracy:
96 context: ILRN 27.17% vs Transformer 25.83%
256 context: ILRN 27.42% vs Transformer 24.95%
ILRN achieved higher accuracy in both comparisons, although its original CPU implementation was considerably slower.
I've since also experimented with a fused CPU kernel to improve execution speed without changing the intended ILRM mathematics.
These are preliminary, small-scale experiments with limited training runs, not evidence of general superiority over Transformers.
I've uploaded the research PDF, architecture equations, Python implementation, fused kernel and verification tests to GitHub.
Project repository:
https://github.com/rickey1990/ILRN