Quantum-inspired Embeddings Projection and Similarity Metrics for Representation Learning
Ivan Kankeu, Stefan Gerd Fritsch, Gunnar Schönhoff, Elie Mounzer, Paul Lukowicz, Maximilian Kiefer-Emmanouilidis
TL;DR
This work tackles the challenge of embedding dimensionality in representation learning by introducing a quantum-inspired projection head and a fidelity-based similarity metric. It maps classical embeddings to quantum states and employs a quantum circuit-based projection to compress embeddings efficiently, evaluated by extending BERT for information retrieval tasks. Empirical results show competitive performance with a 32-fold reduction in parameters, with notable gains when training from scratch on smaller datasets, highlighting data-efficiency advantages. The study demonstrates the practicality of low-entanglement quantum-inspired simulations within neural networks and suggests broad applicability beyond NLP to other representation-learning problems.
Abstract
Over the last decade, representation learning, which embeds complex information extracted from large amounts of data into dense vector spaces, has emerged as a key technique in machine learning. Among other applications, it has been a key building block for large language models and advanced computer vision systems based on contrastive learning. A core component of representation learning systems is the projection head, which maps the original embeddings into different, often compressed spaces, while preserving the similarity relationship between vectors. In this paper, we propose a quantum-inspired projection head that includes a corresponding quantum-inspired similarity metric. Specifically, we map classical embeddings onto quantum states in Hilbert space and introduce a quantum circuit-based projection head to reduce embedding dimensionality. To evaluate the effectiveness of this approach, we extended the BERT language model by integrating our projection head for embedding compression. We compared the performance of embeddings, which were compressed using our quantum-inspired projection head, with those compressed using a classical projection head on information retrieval tasks using the TREC 2019 and TREC 2020 Deep Learning benchmarks. The results demonstrate that our quantum-inspired method achieves competitive performance relative to the classical method while utilizing 32 times fewer parameters. Furthermore, when trained from scratch, it notably excels, particularly on smaller datasets. This work not only highlights the effectiveness of the quantum-inspired approach but also emphasizes the utility of efficient, ad hoc low-entanglement circuit simulations within neural networks as a powerful quantum-inspired technique.
