Matrix Product State Network
An image classifier whose weights are parameterized by a matrix product state, also called a tensor train.
2,383 operations Checked
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
- 632K
- Operations
- 2,383
- Framework
- PyTorch
- Recurrent
- No
- Published
- NeurIPS 2016
- Cited by
- 92 (as of 27 October 2026)
- Authors
- E. Miles Stoudenmire, David J. Schwab
- Source
- GitHub: jemisjoky/TorchMPS
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m18349
- Graph hash
- 59e6dbf478979ec654d1e1ce4b48991411905a169ae92d0a2fe0391d92eff9c0
- Skeleton hash
- 4f5ee82b68dcf264fa6263349022b9981d7dcc62efa1e39b7997deb5badd13a4
- Architecture hash
- d07936e266549e15c35104c8722c4a6fad7d42ed112a110c7d616c56f802d689
- Diagram SHA-256
- e57ba283c58c0dc121b0e441212cdfe0bc43ca3a7688111cfdf2297f5ff18e46
- 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
A matrix product state (MPS), also known as a tensor train, is a kind of tensor network, an efficient representation of a high-dimensional tensor used in physics and mathematics. The paper by Stoudenmire and Schwab shows how algorithms for optimizing such networks can be adapted to supervised learning, using matrix product states to parameterize models for classifying images. For the MNIST data set the paper reports less than 1% test set classification error.
This model is built with TorchMPS, a framework in which MPS models are written as Pytorch Modules. The input data is embedded in a high-dimensional feature space and then contracted with an MPS in the same space. For scalar outputs this contraction step is formally identical to linear regression, but the exponentially large feature space and the MPS-parameterized weight vector make the overall function more expressive. The internal bond dimension is the hyperparameter that sets the expressivity of the MPS.
Key idea. The paper shows that algorithms for optimizing tensor networks can be adapted to supervised learning by using matrix product states to parameterize image classifiers.
- matrix product state
- matrix product state network
- MPS
- MPS classifier
- tensor train
- tensor train classifier
- tensor network
- quantum-inspired tensor network
- TorchMPS
- MNIST
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{stoudenmire2017supervisedlearningquantuminspiredtensor,
title={Supervised Learning with Quantum-Inspired Tensor Networks},
author={E. Miles Stoudenmire and David J. Schwab},
year={2017},
eprint={1605.05775},
archivePrefix={arXiv},
primaryClass={stat.ML},
url={https://arxiv.org/abs/1605.05775},
}