From Superposition to Decision: Semantic Wave Functions for Uncertainty-Aware NLP
Modern language models generate a single deterministic representation for each input, without distinguishing between situations where the model is confident in its answer and those where it is guessing. We propose an architecture that explicitly embeds an uncertainty mechanism into the forward pass of the neural network: the model outputs an answer (collapse mode) or reports uncertainty (wave mode), and the boundary between the modes is determined by a trainable threshold. The architecture is inspired by quantum mechanics as a design heuristic. The key component, the cross-attention observer, contextually constructs a representation of a premise when solving a Natural Language Inference (NLI) task, such that the same premise receives different representations for different hypotheses. With a fully frozen BERT-base and only 885,000 trainable parameters (0.8% of the model), the architecture outperforms the frozen baseline by 4.7 percentage points on the MultiNLI corpus (392,000 examples). For comparison: LoRA $r=12$ (2.0M parameters) achieves 84.5% on the same data, which is significantly higher in terms of accuracy, but without an uncertainty mechanism. The main advantage of the architecture lies not in competing with PEFT methods in terms of accuracy, but in an additional mechanism: the system explicitly distinguishes between «certain» and «uncertain», and the class-based collapse pattern identifies annotation artifacts in the data (confirmed by an adversarial NLI test). Systematic verification showed that quantum mathematics (complex amplitudes, the Schrödinger equation, interference) does not provide an advantage over classical analogues in the current configuration, and it is the architectural mechanism that works, not the physical formalism. This result delineates the limits of the applicability of quantum analogies in machine learning and opens up a direction for further research: under what conditions can quantum mathematics provide a computational advantage on classical hardware. The independent contribution consists of a unified parametric family of criteria for pruning of neural networks s_j = |W_j|^p * |g_j|^q, where W denotes the weight, g denotes the gradient, and the parameters p and q define a specific criterion. It is shown that widely used methods (Magnitude, SNIP) are special cases of this family, and when the gradient is averaged over several batches, the criteria begin to diverge significantly (up to 9.6 percentage points). All key experiments were conducted with 3-5 random initializations and paired statistical tests on full datasets.
Authors
- Elena Vinokurova
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-04-28
- DOI
- https://doi.org/10.5281/zenodo.19866550
- Primary Topic
- Explainable Artificial Intelligence (XAI)
- Type
- article
- Field-Weighted Citation Impact
- 0.00