Table of Contents
Fetching ...

Tensor Networks for Explainable Machine Learning in Cybersecurity

Borja Aizpurua, Samuel Palmer, Roman Orus

TL;DR

The paper addresses the need for explainable anomaly detection in cybersecurity by leveraging Matrix Product States, a Tensor Network approach, to build an unsupervised generative model. By modeling $P(v)=|\Psi(v)|^2$ with $\Psi$ expressed as an MPS, it enables direct probability extraction, sample generation, and efficient computation of information-theoretic quantities such as Von Neumann entropy and mutual information, all from the model’s parameters. The results on adversary-generated threat intelligence show competitive performance with traditional methods while offering rich interpretability, including per-feature probabilities, conditional dependencies, and subsystem entropies, which enhance transparency and actionable insights for analysts. The work demonstrates a path toward transparent, scalable cybersecurity analytics and suggests future enhancements with more complex TN architectures and broader dataset validation to solidify practical impact.

Abstract

In this paper we show how tensor networks help in developing explainability of machine learning algorithms. Specifically, we develop an unsupervised clustering algorithm based on Matrix Product States (MPS) and apply it in the context of a real use-case of adversary-generated threat intelligence. Our investigation proves that MPS rival traditional deep learning models such as autoencoders and GANs in terms of performance, while providing much richer model interpretability. Our approach naturally facilitates the extraction of feature-wise probabilities, Von Neumann Entropy, and mutual information, offering a compelling narrative for classification of anomalies and fostering an unprecedented level of transparency and interpretability, something fundamental to understand the rationale behind artificial intelligence decisions.

Tensor Networks for Explainable Machine Learning in Cybersecurity

TL;DR

The paper addresses the need for explainable anomaly detection in cybersecurity by leveraging Matrix Product States, a Tensor Network approach, to build an unsupervised generative model. By modeling with expressed as an MPS, it enables direct probability extraction, sample generation, and efficient computation of information-theoretic quantities such as Von Neumann entropy and mutual information, all from the model’s parameters. The results on adversary-generated threat intelligence show competitive performance with traditional methods while offering rich interpretability, including per-feature probabilities, conditional dependencies, and subsystem entropies, which enhance transparency and actionable insights for analysts. The work demonstrates a path toward transparent, scalable cybersecurity analytics and suggests future enhancements with more complex TN architectures and broader dataset validation to solidify practical impact.

Abstract

In this paper we show how tensor networks help in developing explainability of machine learning algorithms. Specifically, we develop an unsupervised clustering algorithm based on Matrix Product States (MPS) and apply it in the context of a real use-case of adversary-generated threat intelligence. Our investigation proves that MPS rival traditional deep learning models such as autoencoders and GANs in terms of performance, while providing much richer model interpretability. Our approach naturally facilitates the extraction of feature-wise probabilities, Von Neumann Entropy, and mutual information, offering a compelling narrative for classification of anomalies and fostering an unprecedented level of transparency and interpretability, something fundamental to understand the rationale behind artificial intelligence decisions.
Paper Structure (15 sections, 13 equations, 9 figures, 3 tables)

This paper contains 15 sections, 13 equations, 9 figures, 3 tables.

Figures (9)

  • Figure 1: [Color online] Representation of a Matrix Product State (MPS) for the coefficient $\Psi(v)$ of quantum state $\vert\Psi\rangle$, where the system is described by a sequence of interconnected tensors ${A^{(k)}}$. Each block $A^{(k)v_{k}}$ corresponds to a $D_{k-1} \times D_{k}$ matrix. The vertical lines denote the physical indices $v_{k}$, which represent the state of each subsystem in the quantum state vector $v = (v_{1}, v_{2}, \ldots, v_{N})$, and horizontal lines correspond to bond indices.
  • Figure 2: [Color online] Graphical representation of the contractions to extract the Reduced Density Matrix (RDM) from an MPS: (a) one site, and (b) two distant sites. The contractions leading to left $L$, right $R$ and central $T$ tensors are also highlighted. Tensors with open physical indices are in orange.
  • Figure 3: [Color online] In red, the number of events categorized as anomalies by the MPS model. In blue, how many of the attacks are among the anomalies detected by the model. The x-axis represents the threshold value for the NLL from which an event is considered an anomaly or not. Notice that both plots have different vertical scales.
  • Figure 4: [Color online] Comparison of false positive rate amongst traditional machine learning models and the MPS-based unsupervised model. The y-axis is the percentage of false positives while the x-axis is the virtual bond dimension of MPS.
  • Figure 5: [Color online] Comparison of empirical frequency distribution and MPS-derived distribution for a selected feature, represented in a semi-logarithmic scale.
  • ...and 4 more figures