Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2502.13090

tn4ml: Tensor Network Training and Customization for Machine Learning

Ema Puljak, Sergio Sanchez, Sergi Masot-Llima, Jofre Vallès-Muns, Artur García-Sáez, Maurizio Pierini B

Published Feb 18, 2025• 0 citations
arXivHTMLPDF

Abstract

Tensor Networks have emerged as a prominent alternative to neural networks for addressing Machine Learning challenges in foundational sciences, paving the way for their applications to real-life problems. This paper introduces tn4ml, a novel library designed to seamlessly integrate Tensor Networks into optimization pipelines for Machine Learning tasks. Inspired by existing Machine Learning frameworks, the library offers a user-friendly structure with modules for data embedding, objective function definition, and model training using diverse optimization strategies. We demonstrate its versatility through two examples: supervised learning on tabular data and unsupervised learning on an image dataset. Additionally, we analyze how customizing the parts of the Machine Learning pipeline for Tensor Networks influences performance metrics.

DOI
10.48550/arxiv.2502.13090

Related papers

TensorKrowch: Smooth integration of tensor networks in machine learning

José Ramón Pareja Monturiol, David Pérez-Garcı́a, Alejandro Pozas-Kerstjens

Tensor networks are factorizations of high-dimensional tensors into networks of smaller tensors. They have applications in physics and mathematics, and recently have been proposed as promising machine learning architectures. To ease the integration of tensor networks in machine learning pipelines, we introduce TensorKrowch, an open source Python library built on top of PyTorch. Providing a user-friendly interface, TensorKrowch allows users to construct any tensor network, train it, and integrate it as a layer in more intricate deep learning models. In this paper, we describe the main functionality and basic usage of TensorKrowch, and provide technical details on its building blocks and the optimizations performed to achieve efficient operation.

arXiv:2306.08595•Quantum•Jun 11, 2024•3 citations

Adaptive Tensor Learning with Tensor Networks

Meraj Hashemizadeh, Meilin Liu, Jacob Miller +1 more

Tensor decomposition techniques have shown great successes in machine learning and data science by extending classical algorithms based on matrix factorization to multi-modal and multi-way data. However, there exist many tensor decomposition models~(CP, Tucker, Tensor Train, etc.) and the rank of such a decomposition is typically a collection of integers rather than a unique number, making model and hyper-parameter selection a tedious and costly task. At the same time, tensor network methods are powerful tools developed in the physics community which have recently shown their potential for machine learning applications and offer a unifying view of the various tensor decomposition models. In this paper, we leverage the tensor network formalism to develop a generic and efficient adaptive algorithm for tensor learning. Our method is based on a simple greedy approach optimizing a differentiable loss function starting from a rank one tensor and successively identifying the most promising tensor network edges for small rank increments. Our algorithm can adaptively identify tensor network structures with small number of parameters that effectively optimize the objective function from data. The framework we introduce is very broad and encompasses many common tensor optimization problems. Experiments on tensor decomposition and tensor completion tasks with both synthetic and real world data demonstrate the effectiveness of the proposed algorithm.

•Aug 12, 2020•9 citations

Hybrid Tensor Networks: The Integration of Quantum and Classical Machine Learning

Jiaqi Yao

Tensor networks can compactly represent high-dimensional data in the form of low-rank tensor decompositions, which helps capture complex structures and correlations within the data. However, their inherently multilinear nature limits their potential as universal approximators. To address this limitation, tensor networks are combined with classical neural network layers, introducing nonlinear elements to enhance the model’s expressive power. The Hybrid Tensor Networks (HTN) system encompasses two prevalent tensor network configurations, Matrix Product States and Tree Tensor Networks, which facilitates the adaptable design of models customized for particular machine learning applications. This framework has been validated on classification and image reconstruction tasks, demonstrating its potential to handle complex data structures and its applicability within the machine learning field. Employing this approach, the goal is to establish a foundation for future research on hybrid quantum-classical models, thereby opening up avenues for the realm of quantum machine learning.

International Conference on Computer, Vision and Intelligent Technology (ICCVIT)•Nov 24, 2024•1 citation

TensorNetwork for Machine Learning

Stavros Efthymiou, Jack D. Hidary, Stefan Leichenauer

We demonstrate the use of tensor networks for image classification with the TensorNetwork open source library. We explain in detail the encoding of image data into a matrix product state form, and describe how to contract the network in a way that is parallelizable and well-suited to automatic gradients for optimization. Applying the technique to the MNIST and Fashion-MNIST datasets we find out-of-the-box performance of 98% and 88% accuracy, respectively, using the same tensor network architecture. The TensorNetwork library allows us to seamlessly move from CPU to GPU hardware, and we see a factor of more than 10 improvement in computational speed using a GPU.

arXiv:1906.06329•Jun 7, 2019•58 citations

Generative tensor network classification model for supervised machine learning

Zheng-Zhi Sun, Cheng Peng, Ding Liu +2 more

The tensor network (TN) has recently triggered extensive interests in developing machine learning models defined in quantum Hilbert space. Here, we propose a generative TN classification (GTNC) model for supervised machine learning. The strategy is first to map the classical data onto the states in a many-body Hilbert space and then to capture these states with tensor network schemes. We adopt the TN in the form of matrix product states as an example to implement GTNC where the testing images are classified by comparing the fidelities between different states. Our results show that GTNC has a very impressive performance on benchmark datasets in comparison to several well-known machine learning models. The advantage of GTNC is reflected from the facts that the samples are naturally clustering in the many-body Hilbert space, and it relies much less on hyperparameters. These characters make GTNC an adaptive and universal quantum-inspired method, which would have important applications in quantum computation and quantum information.

arXiv:1903.10742•Physical review. B./Physical review. B•Feb 25, 2020•47 citations

Entangling Solid Solutions: Machine Learning of Tensor Networks for Materials Property Prediction

David E. Sommer, Scott T. Dunham

Progress in the application of machine learning techniques to the prediction of solid-state and molecular materials properties has been greatly facilitated by the development state-of-the-art feature representations and novel deep learning architectures. A large class of atomic structure representations based on expansions of smoothed atomic densities have been shown to correspond to specific choices of basis sets in an abstract many-body Hilbert space. Concurrently, tensor network structures, conventionally the purview of quantum many-body physics and quantum information, have been successfully applied in supervised and unsupervised learning tasks in computer vision and natural language processing. In this work, we argue that architectures based on tensor networks are well-suited to machine learning on Hilbert-space representations of atomic structures. This is demonstrated on supervised learning tasks involving widely available datasets of density functional theory calculations of metal and semiconductor alloys. In particular, we show that certain standard tensor network topologies exhibit strong generalizability even on small training datasets while being parametrically efficient. We further relate this generalizability to the presence of complex entanglement in the trained tensor networks. We also discuss connections to learning with generalized structural kernels and related strategies for compressing large input feature spaces.

arXiv:2203.09613•Mar 17, 2022•1 citation
Tensor Networks have emerged as a prominent alternative to neural networks for addressing Machine Learning challenges in foundational sciences, paving the way for their applications to real-life problems. This paper introduces tn4ml, a novel library designed to seamlessly integrate Tensor Networks into optimization pipelines for Machine Learning tasks. Inspired by existing Machine Learning frameworks, the library offers a user-friendly structure with modules for data embedding, objective function definition, and model training using diverse optimization strategies. We demonstrate its versatility through two examples: supervised learning on tabular data and unsupervised learning on an image dataset. Additionally, we analyze how customizing the parts of the Machine Learning pipeline for Tensor Networks influences performance metrics.
Tensor networks are factorizations of high-dimensional tensors into networks of smaller tensors. They have applications in physics and mathematics, and recently have been proposed as promising machine learning architectures. To ease the integration of tensor networks in machine learning pipelines, we introduce TensorKrowch, an open source Python library built on top of PyTorch. Providing a user-friendly interface, TensorKrowch allows users to construct any tensor network, train it, and integrate it as a layer in more intricate deep learning models. In this paper, we describe the main functionality and basic usage of TensorKrowch, and provide technical details on its building blocks and the optimizations performed to achieve efficient operation.
Tensor decomposition techniques have shown great successes in machine learning and data science by extending classical algorithms based on matrix factorization to multi-modal and multi-way data. However, there exist many tensor decomposition models~(CP, Tucker, Tensor Train, etc.) and the rank of such a decomposition is typically a collection of integers rather than a unique number, making model and hyper-parameter selection a tedious and costly task. At the same time, tensor network methods are powerful tools developed in the physics community which have recently shown their potential for machine learning applications and offer a unifying view of the various tensor decomposition models. In this paper, we leverage the tensor network formalism to develop a generic and efficient adaptive algorithm for tensor learning. Our method is based on a simple greedy approach optimizing a differentiable loss function starting from a rank one tensor and successively identifying the most promising tensor network edges for small rank increments. Our algorithm can adaptively identify tensor network structures with small number of parameters that effectively optimize the objective function from data. The framework we introduce is very broad and encompasses many common tensor optimization problems. Experiments on tensor decomposition and tensor completion tasks with both synthetic and real world data demonstrate the effectiveness of the proposed algorithm.
Tensor networks can compactly represent high-dimensional data in the form of low-rank tensor decompositions, which helps capture complex structures and correlations within the data. However, their inherently multilinear nature limits their potential as universal approximators. To address this limitation, tensor networks are combined with classical neural network layers, introducing nonlinear elements to enhance the model’s expressive power. The Hybrid Tensor Networks (HTN) system encompasses two prevalent tensor network configurations, Matrix Product States and Tree Tensor Networks, which facilitates the adaptable design of models customized for particular machine learning applications. This framework has been validated on classification and image reconstruction tasks, demonstrating its potential to handle complex data structures and its applicability within the machine learning field. Employing this approach, the goal is to establish a foundation for future research on hybrid quantum-classical models, thereby opening up avenues for the realm of quantum machine learning.
We demonstrate the use of tensor networks for image classification with the TensorNetwork open source library. We explain in detail the encoding of image data into a matrix product state form, and describe how to contract the network in a way that is parallelizable and well-suited to automatic gradients for optimization. Applying the technique to the MNIST and Fashion-MNIST datasets we find out-of-the-box performance of 98% and 88% accuracy, respectively, using the same tensor network architecture. The TensorNetwork library allows us to seamlessly move from CPU to GPU hardware, and we see a factor of more than 10 improvement in computational speed using a GPU.
The tensor network (TN) has recently triggered extensive interests in developing machine learning models defined in quantum Hilbert space. Here, we propose a generative TN classification (GTNC) model for supervised machine learning. The strategy is first to map the classical data onto the states in a many-body Hilbert space and then to capture these states with tensor network schemes. We adopt the TN in the form of matrix product states as an example to implement GTNC where the testing images are classified by comparing the fidelities between different states. Our results show that GTNC has a very impressive performance on benchmark datasets in comparison to several well-known machine learning models. The advantage of GTNC is reflected from the facts that the samples are naturally clustering in the many-body Hilbert space, and it relies much less on hyperparameters. These characters make GTNC an adaptive and universal quantum-inspired method, which would have important applications in quantum computation and quantum information.
Progress in the application of machine learning techniques to the prediction of solid-state and molecular materials properties has been greatly facilitated by the development state-of-the-art feature representations and novel deep learning architectures. A large class of atomic structure representations based on expansions of smoothed atomic densities have been shown to correspond to specific choices of basis sets in an abstract many-body Hilbert space. Concurrently, tensor network structures, conventionally the purview of quantum many-body physics and quantum information, have been successfully applied in supervised and unsupervised learning tasks in computer vision and natural language processing. In this work, we argue that architectures based on tensor networks are well-suited to machine learning on Hilbert-space representations of atomic structures. This is demonstrated on supervised learning tasks involving widely available datasets of density functional theory calculations of metal and semiconductor alloys. In particular, we show that certain standard tensor network topologies exhibit strong generalizability even on small training datasets while being parametrically efficient. We further relate this generalizability to the presence of complex entanglement in the trained tensor networks. We also discuss connections to learning with generalized structural kernels and related strategies for compressing large input feature spaces.