Searcharxiv⌕ Search

arXiv subjects

Borja Aizpurua

Publications and source records attributed to Borja Aizpurua.

11 recordsLinked to original sources

Weight Clustering Reveals the Importance of Relative Rank in Large Language Models

Large language models (LLMs) contain billions of parameters, but many exact weight values are not essential. We apply scalar $K$-means clustering to pretrained models, replacing each weight matrix with only 16--64 shared values. For Llama~3.1-8B-Instruct and SmolLM2-135M, this preserves strong accuracy without retraining, providing a simple way to compress LLMs on disk. Fine-tuning only the cluster centroids further recovers 30--40\% of the remaining accuracy loss. Using clustering as an analysis tool, we then keep the cluster assignments fixed and perturb only the shared values, to study which of their properties matter most. We find that preserving their \emph{relative rank} (which connections are stronger or weaker than others) is more important than preserving their exact magnitudes. Breaking this ordering greatly increases perplexity, while changing the values but keeping the ordering causes little loss in many middle and late layers. However, rank preservation alone is not sufficient. Model performance also depends on maintaining the variance of the reconstructed weights, while early layers remain more sensitive; perturbing the cluster assignments themselves shows that their spatial geometry is also load-bearing. We observe the same behavior across four LLMs from two architecture families. These results suggest that the ordering of weights, together with their overall variance, plays a central role in LLM compression and robustness.

cs.LG↗

Pareto-optimal quantum kernel selection for unsupervised anomaly detection on real malware beaconing data

Quantum kernel methods are leading candidates for a practical quantum advantage in machine learning, but assessing that potential requires two quantities usually reported separately: how well a kernel performs on the task, and how far its geometry departs from the classical kernels available for the same problem. We introduce a fully unsupervised, multi-objective protocol that optimises simultaneously the normalised pseudo discrepancy (NPD), a label-free proxy for anomaly detection quality, and the geometric difference (GD) to a tuned classical reference kernel, selecting models from the resulting Pareto front. We apply it to malware beaconing detection in real network traffic, using a one-class support vector machine with fidelity and projected quantum kernels over four data encodings, on simulators and on IQM's 20-qubit Garnet processor. NPD-guided selection alone finds a fidelity kernel that beats the tuned classical baseline, but with a geometric difference too small to certify the gain as quantum. Projected kernels reach far larger geometric differences; the Pareto-selected one only marginally exceeds the baseline (AUC $0.782$ versus $0.765$, $g_{C\to Q}\approx 89>\sqrt{N}$ relative to that reference kernel), still below the NPD-selected fidelity kernel ($0.840$).

quant-ph↗

Quantum Large Language Models via Tensor Network Disentanglers

We introduce a framework for seamlessly integrating quantum computing into pretrained large language models (LLMs). The key idea is to construct a hybrid quantum-classical representation that exactly reproduces the original model, providing a principled starting point from which quantum resources can only improve performance. Our approach replaces the weight matrices in self-attention and multilayer perceptron layers with two variational quantum circuits coupled to a matrix product operator (MPO). Tensor network disentanglers transfer much of each layer's information into the quantum circuits, enabling the remaining tensor network to be compressed to a bond-dimension-one MPO with over three orders of magnitude fewer classical parameters (in our experiments, from 110,592 to approximately 36 for the replaced layer) and less than a 0.3\% increase in perplexity. Training an added unitary adapter on top of this representation then surpasses the original model, reducing perplexity by up to 1.6\%. Finally, we validate the hybrid architecture on a real quantum processor, demonstrating a practical route towards quantum-enhanced language models.

quant-ph↗

Quantum-enhanced Large Language Models on Quantum Hardware via Cayley Unitary Adapters

Large language models (LLMs) have transformed artificial intelligence, yet classical architectures impose a fundamental constraint: every trainable parameter demands classical memory that scales unfavourably with model size. Quantum computing offers a qualitatively different pathway, but practical demonstrations on real hardware have remained elusive for models of practical relevance. Here we show that Cayley-parameterised unitary adapters -- quantum circuit blocks inserted into the frozen projection layers of pre-trained LLMs and executed on a 156-qubit IBM Quantum System Two superconducting processor -- improve the perplexity of Llama 3.1 8B, an 8-billion-parameter model in widespread use, by 1.4% with only 6,000 additional parameters and end-to-end inference validated on real Quantum Processing Unit (QPU). A systematic study on SmolLM2 (135M parameters), chosen for its tractability, reveals monotonically improving perplexity with unitary block dimension, 83% recovery of compression-induced degradation, and correct answers to questions that both classical baselines fail -- with a sharp noise-expressivity phase transition identifying the concrete path to quantum utility at larger qubit scales.

quant-ph↗

Classical Neural Networks on Quantum Devices via Tensor Network Disentanglers: A Case Study in Image Classification

We address the problem of implementing bottleneck layers from classical pre-trained neural networks on a quantum computer, with the goal of exploring intrinsically quantum ansatz for representing large linear layers within hybrid classical-quantum models. Our approach begins with a compression step in which the target linear layer is represented as an effective matrix product operator (MPO) without degrading model performance. The MPO is then further disentangled into a more compact form. This enables a hybrid classical-quantum execution scheme, where the disentangling circuits are deployed on a quantum computer while the remainder of the network -- including the disentangled MPO -- runs on classical hardware. We introduce two complementary algorithms for MPO disentangling: (i) an explicitly disentangling variational method leveraging standard tensor-network optimization techniques, and (ii) an implicitly disentangling gradient-descent-based approach. We validate these methods through a proof-of-concept translation of simple classical neural networks for MNIST and CIFAR-10 image classification into a hybrid classical-quantum form.

quant-ph↗

Tensor Network based Gene Regulatory Network Inference for Single-Cell Transcriptomic Data

Deciphering complex gene-gene interactions remains challenging in transcriptomics as traditional methods often miss higher-order and nonlinear dependencies. This study introduces a quantum-inspired framework leveraging tensor networks (TNs) to optimally map expression data into a lower dimensional representation preserving biological locality. Using Quantum Mutual Information (QMI), a nonparametric measure natural for tensor networks, we quantify gene dependencies and establish statistical significance via permutation testing. This constructs robust interaction networks where the edges reflect biologically meaningful relationships that are resilient to random chance. The approach effectively distinguishes true regulatory patterns from experimental noise and biological stochasticity. To test the proposed method, we recover a gene regulatory network consisted of six pathway genes from single-cell RNA sequencing data comprising over $28.000$ lymphoblastoid cells. Furthermore, we unveil several triadic regulatory mechanisms. By merging quantum physics inspired techniques with computational biology, our method provides novel insights into gene regulation, with applications in disease mechanisms and precision medicine.

q-bio.MN↗

Hacking Cryptographic Protocols with Tensor Network Attacks

Here we introduce the application of Tensor Networks (TN) to launch attacks on symmetric-key cryptography. Our approaches make use of Matrix Product States (MPS) as well as our recently-introduced Flexible-PEPS Quantum Circuit Simulator (FQCS). We compare these approaches with traditional brute-force attacks and Variational Quantum Attack Algorithm (VQAA) methods also proposed by us. Our benchmarks include the Simplified Data Encryption Standard (S-DES) with 10-bit keys, Simplified Advanced Encryption Standard (S-AES) with 16-bit keys, and Blowfish with 32-bit keys. We find that for small key size, MPS outperforms VQAA and FQCS in both time and average iterations required to recover the key. As key size increases, FQCS becomes more efficient in terms of average iterations compared to VQAA and MPS, while MPS remains the fastest in terms of time. These results highlight the potential of TN methods in advancing quantum cryptanalysis, particularly in optimizing both speed and efficiency. Our results also show that entanglement becomes crucial as key size increases.

quant-ph↗

Tensor Networks for Explainable Machine Learning in Cybersecurity

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.

cs.LG↗

Hacking Cryptographic Protocols with Advanced Variational Quantum Attacks

Here we introduce an improved approach to Variational Quantum Attack Algorithms (VQAA) on crytographic protocols. Our methods provide robust quantum attacks to well-known cryptographic algorithms, more efficiently and with remarkably fewer qubits than previous approaches. We implement simulations of our attacks for symmetric-key protocols such as S-DES, S-AES and Blowfish. For instance, we show how our attack allows a classical simulation of a small 8-qubit quantum computer to find the secret key of one 32-bit Blowfish instance with 24 times fewer number of iterations than a brute-force attack. Our work also shows improvements in attack success rates for lightweight ciphers such as S-DES and S-AES. Further applications beyond symmetric-key cryptography are also discussed, including asymmetric-key protocols and hash functions. In addition, we also comment on potential future improvements of our methods. Our results bring one step closer assessing the vulnerability of large-size classical cryptographic protocols with Noisy Intermediate-Scale Quantum (NISQ) devices, and set the stage for future research in quantum cybersecurity.

quant-ph↗

Multi-disk clutch optimization using quantum annealing

In this work, we develop a new quantum algorithm to solve a combinatorial problem with significant practical relevance occurring in clutch manufacturing. It is demonstrated how quantum optimization can play a role in real industrial applications in the manufacturing sector. Using the quantum annealer provided by D-Wave Systems, we analyze the performance of the quantum and quantum-classical hybrid solvers and compare them to deterministic- and random-algorithm classical benchmark solvers. The continued evolution of the quantum technology, indicating an expectation for even greater relevance in the future is discussed and the revolutionary potential it could have in the manufacturing sector is highlighted.

quant-ph↗

Improving Gradient Methods via Coordinate Transformations: Applications to Quantum Machine Learning

Machine learning algorithms, both in their classical and quantum versions, heavily rely on optimization algorithms based on gradients, such as gradient descent and alike. The overall performance is dependent on the appearance of local minima and barren plateaus, which slow-down calculations and lead to non-optimal solutions. In practice, this results in dramatic computational and energy costs for AI applications. In this paper we introduce a generic strategy to accelerate and improve the overall performance of such methods, allowing to alleviate the effect of barren plateaus and local minima. Our method is based on coordinate transformations, somehow similar to variational rotations, adding extra directions in parameter space that depend on the cost function itself, and which allow to explore the configuration landscape more efficiently. The validity of our method is benchmarked by boosting a number of quantum machine learning algorithms, getting a very significant improvement in their performance.

quant-ph↗