EventsThe 2nd International Online Conference on Mathematics and Applications
Published
This submission belongs to the session S6. Mathematics, Computer Science and Artificial Intelligence of the event The 2nd International Online Conference on Mathematics and Applications
Published date
04 Jun, 2026
Academic Editor
author-avatarMarjan Mernik
Citation
Rabab Khan Rongon, Sadab Khan Prangon, Quantum Harmonic Oscillator-Inspired Energy-Based Attention for Stable and Interpretable Neural Networks, in Proceedings of The 2nd International Online Conference on Mathematics and Applications, 10 June–12 June 2026, MDPI: Basel, Switzerland
Share
Email
Facebook
Twitter
LinkedIn

Quantum Harmonic Oscillator-Inspired Energy-Based Attention for Stable and Interpretable Neural Networks

Sadab Khan Prangon 2
1. Department of Computer Science and Engineering, Military Institute of Science and Technology (MIST), Dhaka, Bangladesh, Bangladesh
2. Department of Computer Science and Engineering, IUBAT - International University of Business Agriculture and Technology, Dhaka, Bangladesh, Bangladesh
Abstract

Introduction:
Attention mechanisms are a core component of modern artificial intelligence, especially in Transformer-based architectures. However, widely used formulations such as scaled dot-product attention are primarily heuristic and lack a clear energy-based interpretation. This limits theoretical understanding of their stability, robustness, and optimization behavior.

Methods:
In this work, we propose a novel attention mechanism inspired by the quantum harmonic oscillator (QHO). Query–key interactions are modeled as energy states within a bounded harmonic potential, where similarity scores are mapped to energy values using a Hamiltonian-based formulation. Instead of conventional softmax normalization, attention weights are computed through an exponential energy decay function motivated by quantum principles. We further analyze the proposed formulation to establish properties such as bounded gradients, Lipschitz continuity, and improved conditioning of the optimization landscape.

Results:
The proposed QHO-based attention is integrated into Transformer architectures and evaluated on standard classification and sequence modeling tasks. Experimental results show that it achieves performance comparable to conventional attention mechanisms while providing improved training stability and reduced sensitivity to initialization. Empirical analysis also indicates more controlled gradient behavior and enhanced robustness under noisy inputs and adversarial perturbations.

Conclusions:
This work introduces a physically interpretable and mathematically grounded alternative to traditional attention mechanisms. By framing attention through an energy-based perspective, it strengthens the theoretical foundation of neural architectures and offers a promising direction for building more stable, robust, and interpretable deep learning models.

Keywords
Quantum harmonic oscillator
Energy-based attention
Mathematical foundations of artificial intelligence
Transformer models
Neural network stability
Optimization theory
Robust machine learning
Interpretable AI
Hybrid Physics-Aware Sparse Neural Networks (Hy-PAS): A Unified Framework For Learning and Solving PDES
Simplification of calculations for repeating decimal fractions using a direct method