tn4ml: Tensor Network Training and Customization for Machine Learning

Ema Puljak, Sergio Sanchez-Ramirez, Sergi Masot-Llima, Jofre Vallès-Muns, Artur Garcia-Saez +1 more
2/18/2025
cs.LGcs.MSquant-ph

No official code found. Best implementation: bsc-quantic/tn4ml (23 stars, MIT, JAX, last commit 2026-04-29).

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.

View on arXivView PDF

Code Implementations(1)

bsc-quantic/tn4mlCommunity100%
JAXMIT

Tensor Networks for Machine Learning

239PythonJul 12, 20225 months agoMIT
flaxjaxmachine-learningmatrix-product-statesoptax+5 more

Similar Papers

Cite this paper

@article{puljak2025tnml,
  title  = {tn4ml: Tensor Network Training and Customization for Machine Learning},
  author = {Ema Puljak and Sergio Sanchez-Ramirez and Sergi Masot-Llima and Jofre Vallès-Muns and Artur Garcia-Saez and Maurizio Pierini},
  year   = {2025},
  eprint = {2502.13090},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.13090v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.13090.svg)](https://codeofpaper.com/paper/2502.13090)

Discussion