Transformers have become the dominant architecture for sequence modeling in natural language processing;however,their effectiveness critically depends on how positional information is encoded.Conventional positional e...Transformers have become the dominant architecture for sequence modeling in natural language processing;however,their effectiveness critically depends on how positional information is encoded.Conventional positional encodings,while effective,may have limited structural flexibility for capturing complex global sequence relationships.Recent quantum-inspired approaches have sought to address this limitation,yetmany either oversimplify quantum principles or introduce substantial computational or hardware overhead.We introduce a novel Quantum Fourier Transform(QFT)-inspired positional encoding scheme for transformers,motivated by the structured frequency representation of the QFT.Unlike prior approaches that either emulate quantum operations superficially or require complex circuit constructions,the proposed method provides a learnable hybrid encoding that preserves quantuminspired structure while remaining aligned with hardware-efficient circuit primitives and structurally compatible with future near-term quantum implementations.Experiments on WikiText-103 indicate that the proposed encoding achieves competitive perplexity,improved robustness to input scrambling,and stable training behavior relative to alternative quantum-inspired baselines under the evaluated settings.Preliminary circuit-level simulations further suggest favorable noise resilience of the associated encoding primitives.These findings support the potential utility of incorporating quantum-inspired design principles into deep learning architectures and provide a foundation for future exploration at the interface of quantum computing and transformer-based natural language processing(NLP).展开更多
基金Prince Sattam bin Abdulaziz University for funding this research work through the project number(PSAU/2025/01/35090).
摘要Transformers have become the dominant architecture for sequence modeling in natural language processing;however,their effectiveness critically depends on how positional information is encoded.Conventional positional encodings,while effective,may have limited structural flexibility for capturing complex global sequence relationships.Recent quantum-inspired approaches have sought to address this limitation,yetmany either oversimplify quantum principles or introduce substantial computational or hardware overhead.We introduce a novel Quantum Fourier Transform(QFT)-inspired positional encoding scheme for transformers,motivated by the structured frequency representation of the QFT.Unlike prior approaches that either emulate quantum operations superficially or require complex circuit constructions,the proposed method provides a learnable hybrid encoding that preserves quantuminspired structure while remaining aligned with hardware-efficient circuit primitives and structurally compatible with future near-term quantum implementations.Experiments on WikiText-103 indicate that the proposed encoding achieves competitive perplexity,improved robustness to input scrambling,and stable training behavior relative to alternative quantum-inspired baselines under the evaluated settings.Preliminary circuit-level simulations further suggest favorable noise resilience of the associated encoding primitives.These findings support the potential utility of incorporating quantum-inspired design principles into deep learning architectures and provide a foundation for future exploration at the interface of quantum computing and transformer-based natural language processing(NLP).