vix.ing · top · new · best · stats · spec

A Hybrid Transformer Architecture with a Quantized Self-Attention Mechanism Applied to Molecular Generation

2025/02/26 by Anthony M. Smaldone, Smaldone, Anthony M., Yu Shee +11 · 5 citations
Engineering · #Advanced MEMS and NEMS Technologies #FOS: Physical sciences #Nanofabrication and Lithography Techniques #Photonic and Optical Devices #Quantum Physics (quant-ph)

paper · pdf · doi:10.48550/arxiv.2502.19214

openalex publication_date 2025/02/26 · openalex created_date 2025/10/15 · openalex updated_date 2026/07/28

Abstract

The success of the self-attention mechanism in classical machine learning models has inspired the development of quantum analogs aimed at reducing computational overhead. Self-attention integrates learnable query and key matrices to calculate attention scores between all pairs of tokens in a sequence. These scores are then multiplied by a learnable value matrix to obtain the output self-attention matrix, enabling the model to effectively capture long-range dependencies within the input sequence. Here, we propose a hybrid quantum-classical self-attention mechanism as part of a transformer decoder, the architecture underlying large language models (LLMs). To demonstrate its utility in chemistry, we train this model on the QM9 dataset for conditional generation, using SMILES strings as input, each labeled with a set of physicochemical properties that serve as conditions during inference. Our theoretical analysis shows that the time complexity of the query-key dot product is reduced from O(n2 d) in a classical model to O(n2log d) in our quantum model, where n and d represent the sequence length and embedding dimension, respectively. We perform simulations using NVIDIA's CUDA-Q platform, which is designed for efficient GPU scalability. This work provides a promising avenue for quantum-enhanced natural language processing (NLP).

Cited by

Related