Skip to main content
QUICK REVIEW

[Paper Review] Parallelizing Legendre Memory Unit Training

Narsimha Chilkuri, Chris Eliasmith|arXiv (Cornell University)|Feb 22, 2021
Topic ModelingComputer Science34 references8 citations
TL;DR

This paper introduces a parallelizable variant of the Legendre Memory Unit (LMU) that maintains its RNN inference capability while enabling efficient GPU training through reformulation of its linear time-invariant (LTI) memory component. The method achieves up to 200x faster training than the original LMU and sets new state-of-the-art results on multiple benchmarks, including psMNIST and IMDB sentiment analysis, with fewer parameters than comparable LSTMs and Transformers.

ABSTRACT

Recently, a new recurrent neural network (RNN) named the Legendre Memory Unit (LMU) was proposed and shown to achieve state-of-the-art performance on several benchmark datasets. Here we leverage the linear time-invariant (LTI) memory component of the LMU to construct a simplified variant that can be parallelized during training (and yet executed as an RNN during inference), thus overcoming a well known limitation of training RNNs on GPUs. We show that this reformulation that aids parallelizing, which can be applied generally to any deep network whose recurrent components are linear, makes training up to 200 times faster. Second, to validate its utility, we compare its performance against the original LMU and a variety of published LSTM and transformer networks on seven benchmarks, ranging from psMNIST to sentiment analysis to machine translation. We demonstrate that our models exhibit superior performance on all datasets, often using fewer parameters. For instance, our LMU sets a new state-of-the-art result on psMNIST, and uses half the parameters while outperforming DistilBERT and LSTM models on IMDB sentiment analysis.

Motivation & Objective

  • Address the fundamental limitation of RNN training—sequential computation—that hinders efficient GPU utilization.
  • Overcome the scalability barrier of recurrent networks by enabling parallelization of the LTI memory component in the LMU.
  • Demonstrate that a simplified, linear-only recurrent architecture can match or exceed the performance of complex RNNs and Transformers on diverse sequence modeling tasks.
  • Validate the model's effectiveness across multiple benchmarks, including long-sequence tasks and transfer learning scenarios.
  • Establish a generalizable framework for parallelizing any deep network with linear recurrent components.

Proposed method

  • Reformulate the Legendre Memory Unit's LTI memory component to allow non-sequential, parallel computation during training using closed-form solutions to linear recurrence relations.
  • Replace the original sequential RNN recurrence with a feedforward computation that computes the entire hidden state trajectory at once using matrix exponentials and Legendre basis projections.
  • Use the state transition matrix of the LTI system to compute all hidden states simultaneously, avoiding iterative recurrence during backpropagation.
  • Maintain the original LMU's inference behavior by switching back to sequential RNN mode at test time, preserving low memory and latency.
  • Apply the parallelization technique to a simplified LMU variant where recurrence is restricted to the linear component, enabling full GPU parallelism.
  • Leverage the mathematical structure of linear time-invariant systems to derive a closed-form expression for the hidden state evolution, enabling batched, parallel training.

Experimental results

Research questions

  • RQ1Can the linear memory component of the LMU be reformulated to allow parallel training without sacrificing inference efficiency?
  • RQ2To what extent can parallelization of the LTI component reduce training time for sequence models?
  • RQ3Does a simplified, linear-only recurrent architecture outperform the original LMU and other SotA models like LSTMs and Transformers on diverse sequence tasks?
  • RQ4Can this parallelized architecture achieve better performance with fewer parameters than existing models on NLP benchmarks?
  • RQ5How does the model perform in transfer learning settings, such as fine-tuning a language model on a downstream NLP task?

Key findings

  • The proposed parallelized LMU variant achieves up to 200x faster training compared to the original LMU on long sequences, such as in the Mackey-Glass task.
  • On psMNIST, the model sets a new state-of-the-art result, outperforming previous SotA models with half the number of parameters.
  • On IMDB sentiment analysis, the model outperforms both LSTM and DistilBERT models while using up to 650x fewer parameters.
  • The model achieves a BLEU score of 26.2 on the IWSLT’15 En-Vi translation task (case-insensitive), outperforming an LSTM baseline by 2.3 BLEU points.
  • The LTI version of the model shows linear growth in training time with sequence length, while the parallel version maintains nearly constant training time, demonstrating effective parallelization.
  • The model achieves a text8 language modeling score of 1.61, comparable to the original LMU, while enabling vastly accelerated training.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.