All models

Quaternion LSTM

An LSTM built on quaternion algebra, which treats a multidimensional input feature as a single entity.

Time series · 2,065 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 2,065 operations (515 KB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
8.1K
Operations
2,065
Framework
PyTorch
Recurrent
Yes
Published
ICLR 2019
Cited by
111 (as of 28 October 2026)
Authors
Titouan Parcollet, Mirco Ravanelli, Mohamed Morchid and others
License
GPL-3.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m19569
Graph hash
fdd4321a35e22ba477a4974cf7933c4ed7dc8807b325b73a3eccab0f49cdc908
Skeleton hash
3169e9d024a17417ddf02655ecbdb6dece3d0771c38acfe95ac338e6ffd6567e
Architecture hash
60ebf25a6093f67f24b71814d2dbe5e6804cd9d3a69e53be68626af684d7aa64
Diagram SHA-256
836e22fec91c8a9005249b8b9c6e3e0e16cc433129b0d6706546667bd9fef116
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

The quaternion LSTM (QLSTM) is a long short-term memory network whose computations use quaternion algebra, proposed together with a quaternion recurrent neural network (QRNN). The motivation is that tasks such as speech or image recognition involve multidimensional input features with strong internal dependencies between their dimensions.

The paper compares quaternions to capsules: multidimensional features are composed and processed as single entities, while the recurrent operation reveals correlations between the elements of the sequence. In an automatic speech recognition application, the paper reports that QRNN and QLSTM perform better than RNN and LSTM. It also reports that they need fewer free parameters than real-valued RNNs and LSTMs, by a maximum factor of 3.3.

The authors' PyTorch repository keeps its core components in a package called core_qnn, with reusable modules such as QuaternionLinear, QuaternionConv and QuaternionTransposeConv.

Key idea. The paper proposes quaternion-valued recurrent and LSTM networks and reports better speech recognition results than real-valued RNNs and LSTMs with fewer free parameters.

  • quaternion lstm
  • qlstm
  • quaternion long short-term memory
  • quaternion recurrent neural network
  • quaternion neural network
  • quaternion rnn
  • speech recognition
  • sequence modeling

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{parcollet2019quaternionrecurrentneuralnetworks,
      title={Quaternion Recurrent Neural Networks}, 
      author={Titouan Parcollet and Mirco Ravanelli and Mohamed Morchid and Georges Linarès and Chiheb Trabelsi and Renato De Mori and Yoshua Bengio},
      year={2019},
      eprint={1806.04418},
      archivePrefix={arXiv},
      primaryClass={stat.ML},
      url={https://arxiv.org/abs/1806.04418}, 
}