Table of Contents
Fetching ...

trainsum -- A Python package for quantics tensor trains

Paul Haubenwallner, Matthias Heller

TL;DR

Once approximated, trainsum can perform normal arithmetic operations with quantics tensor trains, including addition, Einstein summations and element-wise transformations, and can be therefore used for generic computations with applications in simulation, data compression, machine learning and data analysis.

Abstract

We present trainsum, a versatile Python package for doing computations with multidimensional quantics tensor trains: https://github.com/fh-igd-iet/trainsum. Using the Array API standard together with opt_einsum, trainsum allows the effortless approximation of tensors or functions by tensor trains independent of their shape or dimensionality. Once approximated, our package can perform normal arithmetic operations with quantics tensor trains, including addition, Einstein summations and element-wise transformations. It can be therefore used for generic computations with applications in simulation, data compression, machine learning and data analysis.

trainsum -- A Python package for quantics tensor trains

TL;DR

Once approximated, trainsum can perform normal arithmetic operations with quantics tensor trains, including addition, Einstein summations and element-wise transformations, and can be therefore used for generic computations with applications in simulation, data compression, machine learning and data analysis.

Abstract

We present trainsum, a versatile Python package for doing computations with multidimensional quantics tensor trains: https://github.com/fh-igd-iet/trainsum. Using the Array API standard together with opt_einsum, trainsum allows the effortless approximation of tensors or functions by tensor trains independent of their shape or dimensionality. Once approximated, our package can perform normal arithmetic operations with quantics tensor trains, including addition, Einstein summations and element-wise transformations. It can be therefore used for generic computations with applications in simulation, data compression, machine learning and data analysis.
Paper Structure (28 sections, 43 equations, 4 figures, 1 table)

This paper contains 28 sections, 43 equations, 4 figures, 1 table.

Figures (4)

  • Figure 1: Examples for tensor train shapes for conforming and non-conforming Einstein summations. a) and c) are valid since the the result is a linear tensor network and the $j_q$ dimensions fully overlap. b) is not valid due to a missing overlap of $j_q$. In d) all $j_q$ are overlapping, but the result is not linear.
  • Figure 2: Decomposition algorithm for a multiplication of two tensor trains using three cores at each step. The black dots are multidimensional Kronecker deltas. The gray background indicates a contraction over all closed dimensions, while the dotted lines stand for a singular value decomposition. Orthonormal cores are depicted as triangles where the direction of the orthonormalization is the tip of the triangle.
  • Figure 3: Shape of the Fourier tensor train in graphical notation. Here the matrix $M(i,j)$ of shape $240\times240$ is factorized into $i=80i_1+40i_2+20i_3+4i_4+2i_5+i_6$ and $j=120j_1+60j_2+12j_3+6j_4+3j_5+j_6$
  • Figure 4: Exemplary tensor train shapes. a) represents a quantized vector with 20 entries. b) and c) represent a matrix of shape (8, 20). b) is the "interleaved" shape, while c) is the "block" shape.