Invertible Memory Flow Networks
Liyu Zerihun, Alexandr Plashchinsky
TL;DR
Invertible Memory Flow Networks (IMFN) address long-context memory by factorizing compression into a binary-tree of locally invertible 2→1 merges, enabling $O(log N)$-depth memory with an explicit inverse path. The approach allows training of a high-capacity teacher and distillation into a constant-time online student, achieving sublinear error growth on long MNIST sequences and high-dimensional video data like UCF-101. Empirical results show IMFN outperforms larger end-to-end baselines (Transformer and Mamba) on reconstruction fidelity while demanding fewer parameters, supported by a Merkle-style update mechanism for efficient trajectory updates. The work highlights the practical viability of invertible, structured memory for long-horizon tasks and outlines future extensions to real-time video, audio, and agentic planning contexts with bounded memory.
Abstract
Long sequence neural memory remains a challenging problem. RNNs and their variants suffer from vanishing gradients, and Transformers suffer from quadratic scaling. Furthermore, compressing long sequences into a finite fixed representation remains an intractable problem due to the difficult optimization landscape. Invertible Memory Flow Networks (IMFN) make long sequence compression tractable through factorization: instead of learning end-to-end compression, we decompose the problem into pairwise merges using a binary tree of "sweeper" modules. Rather than learning to compress long sequences, each sweeper learns a much simpler 2-to-1 compression task, achieving O(log N) depth with sublinear error accumulation in sequence length. For online inference, we distilled into a constant-cost recurrent student achieving O(1) sequential steps. Empirical results validate IMFN on long MNIST sequences and UCF-101 videos, demonstrating compression of high-dimensional data over long sequences.
