When a word-sense model trained on general English meets a specialist text, it fails in a predictable way. It keeps choosing the meaning that was most common in its training data: "bank" as a financial institution in an environmental report, "charges" as criminal accusations in a financial filing. Agirre et al. document the damage. Supervised disambiguation precision falls from 85–87% when systems are trained in-domain to 53–62% when they are trained on general text, and they attribute much of the drop to shifted sense frequencies (Eneko Agirre et al.). The standard statistical fix re-estimates how often each sense occurs in the new domain from unlabeled text and reweights the classifier's predictions. That fix can only rescale senses. It cannot capture the other thing that happens in a new domain, which is that the contextual signature of a sense itself drifts.
We propose to represent a domain's sense distribution as a density operator: a small positive matrix with unit trace, the object quantum mechanics uses for a probabilistic mixture of states. We then estimate that operator from unlabeled domain text with an expectation-maximization procedure. When the operator is diagonal in the sense basis, our prediction rule reduces exactly to classical prior reweighting. Its off-diagonal entries add a controlled way to rotate which contexts count as evidence for which sense. The core claim is testable. A classical encoder, a shallow parameterized quantum circuit (a sequence of tunable quantum gates whose angles are learned like weights), and a domain density operator adapted without labels should beat diagonal prior adaptation on lemmas whose meaning drifts across domains. On lemmas that undergo only a frequency shift, the two should tie. The design lets us measure whether the quantum structure contributes anything beyond its classical shadow, which the prior quantum-inspired disambiguation work never isolated.
Core Claim
The model has three parts. First, a frozen classical encoder maps a target word in context $x$ to a short vector, and a shallow circuit angle-encodes it into a state $|\psi_x\rangle$ on $n \le 4$ qubits. Angle encoding means each feature sets one qubit's rotation angle. Second, each sense $s$ of a lemma is a measurement projector $\Pi_s$ onto part of that space. Third, each domain $d$ is a density operator $\rho_d$. The model predicts
$$ p(s \mid x, d) = \frac{\langle \psi_x | \rho_d^{1/2}\, \Pi_s\, \rho_d^{1/2} | \psi_x \rangle}{\langle \psi_x | \rho_d | \psi_x \rangle}. $$
If $\rho_d$ commutes with every $\Pi_s$, meaning it is diagonal in the sense basis with entries $\pi_s$, this equals $\pi_s \langle\psi_x|\Pi_s|\psi_x\rangle$ renormalized. That is exactly Bayes-rule prior reweighting of a classifier's posteriors. Off-diagonal terms tilt the measurement toward directions that mix senses, so the context evidence for a sense is re-aimed rather than merely rescaled.
On the source corpus, the circuit and the projectors are trained with labels. In the target domain, only $\rho_d$ is re-estimated, from unlabeled text, by maximizing the likelihood of the domain's contexts. That E-step (the step that infers the unobserved senses) has no classical conditional-probability form. We solve it with the Petz recovery map, the quantum analogue of Bayesian inversion, following DO-EM. DO-EM derived a monotone evidence bound for density-operator latent-variable models but tested it only on image generation.
The novelty is specific. Existing quantum-inspired disambiguation models use superposition and interference terms for rare general-domain senses: QR-WSD, the Quantum Interference Model, and QiWSD. All three are trained with labels, run as classical linear algebra, and are evaluated only on the general-domain WordNet benchmark. None adapts to a new domain without labels. The only real hybrid circuit for language in the file, BERT-QTC, does utterance-level intent classification with no domain shift. Eisinger et al. use density matrices and Von Neumann entropy to represent syntactic ambiguity on 16 synthetic sentences. We reuse their idea that entropy quantifies ambiguity, but we apply it to lexical sense drift in real documents.
Research Program
The encoder is a frozen BERT-class model, and its token vector for the target word is reduced to 8–16 features by a small learned projection. Haoran Ma et al. show that nonlinear classical preprocessing before a quantum circuit is necessary (Haoran Ma et al.), so this projection is nonlinear. The circuit uses angle encoding and two to three entangling layers, implemented as PennyLane QNodes, which are circuits wrapped as differentiable layers with parameter-shift gradients. We keep the circuit this shallow on purpose. Deep circuits suffer vanishing gradients, and finite measurement samples add gradient noise (Slimane Thabet et al.).
Most lemmas have eight or fewer senses, so a three-qubit sense register is enough, and each $\rho_d$ is at most an 8×8 complex matrix per lemma. Lemmas with little target data share a domain-level operator. Source training uses SemCor. Adaptation uses only the unlabeled documents of the target domain.
The analysis has two strands. The first compares the estimated diagonal of $\rho_d$ with the gold target sense frequencies. The second tests whether the Von Neumann entropy of $\rho_d$, which measures how mixed the domain's sense distribution is, predicts per-lemma error in the target domain before any labels are seen. If it does, that is a practical triage signal for deciding which terms need expert annotation.
Training and adaptation run on a statevector simulator, which computes the circuit's output exactly on a classical machine. Physical hardware is reserved for inference on a fixed evaluation subset, because round-trip latency to cloud devices makes training there impractical (Slimane Thabet et al.). The hardware runs check how much device noise erodes any simulated gain, which most hybrid work never reports (Nabil Anan Orka et al.).
Baselines
The naive reference point is the source-trained model with no adaptation: the same encoder and head trained on SemCor and applied directly to the environment-domain documents of SemEval-2010 Task 17. It marks where prior-drift collapse sits in our own setup. Agirre et al.'s cited general-to-domain precision of 53–62%, against 85–87% for in-domain training (Eneko Agirre et al.), gives the expected range. We found no reported result on Lacuna for the final Task 17 competition systems, so we will reproduce this baseline rather than quote one.
The key ablation, and the most dangerous competitor, is diagonal-$\rho_d$ adaptation. It is the same model with $\rho_d$ constrained to commute with the sense projectors, estimated by the same EM loop on the same unlabeled text with the same iteration budget. Mathematically this is classical label-shift correction. The full model beats it only if it gains a meaningful margin on held-out target F1, concentrated on drift lemmas. A win of that shape is what would show the off-diagonal structure matters.
The second ablation removes "quantumness" while keeping the geometry. It replaces the complex Hermitian $\rho_d$ with a real symmetric positive matrix of the same size, and the circuit with a classical nonlinear head of matched parameter count. Both are adapted by the analogous classical EM with a full-covariance-style domain matrix. If this real-valued shadow matches the full model, the honest conclusion is that the gain comes from rotating the evidence, not from complex amplitudes or circuits. We would report it that way.
The strongest existing methods are the quantum-inspired disambiguators. QiWSD reports 81.8% F1 on the unified ALL test set, and the Quantum Interference Model reports 81.6%. Neither reports a domain-shift number; we found no reported result on Lacuna for any quantum-inspired disambiguator on SemEval-2010 Task 17. We will retrain QiWSD from its published description on SemCor with the same encoder size. It will be evaluated both as-is on Task 17 and with the diagonal prior adaptation added on top. On the general-domain ALL set, the proposal must stay within about a point of 81.8%, because adaptation should not cost source accuracy. On Task 17 it must beat adapted QiWSD.
A supervised upper reference fine-tunes on 30% of target-labeled data, the amount Agirre et al. cite as roughly matching full combined training. This tells us how much of the labeled-adaptation gap unsupervised $\rho_d$ closes.
All systems share one encoder checkpoint, one hyperparameter search budget of equal trial count tuned on SemEval-2007, and one pool of unlabeled target text.
Why not just…?
Why not just continue pre-training the encoder on domain text? Jeniya Tabassum et al. show large gains from this, up to 21 F1 points on StackOverflow entity recognition. But those gains came from 152 million in-domain sentences. The environment domain of Task 17 offers a few documents, and many specialist domains are smaller still. We will run masked-language continued pre-training on exactly the unlabeled text our method sees. The two approaches can also be combined, and if continued pre-training closes the gap on its own, our result is limited to the scarce-text regime.
Why not just re-estimate sense priors classically with EM? This is the real threat, and the proposal is built around it: it is our diagonal ablation. If domain shift in disambiguation is mostly a change in sense frequencies, as Agirre et al.'s "bank" example suggests, the diagonal model will match the full one. We settle this with the lemma split and the controlled shift experiment below, and we accept a tie as a finding.
Why not just use a classical head, since four qubits are trivially simulable? The circuit offers no computational advantage at this size, and we do not claim one. The parameter-efficiency results of Muhammad Kashif et al. come from synthetic spirals and do not transfer automatically. BERT-QTC's +1.5% over a classical temporal convolution (Chao-Han Huck Yang et al.) comes from easy intent data. The matched real-valued ablation is the direct test of whether the quantum parameterization earns anything.
Why not just prompt a large language model with domain decomposition? Entity decomposition with filtering raises zero-shot clinical recognition F1 by up to 11.52% (Reza Averly & Xia Ning). Yet Llama 3-70b still rendered financial "charges" as criminal charges (Mariam Nakhlé et al.). We include a prompted-LLM disambiguation reference on the same evaluation items to report cost and accuracy side by side, but it is not the mechanism-level comparison this proposal targets.
Proposed Experiments
The primary benchmark is SemEval-2010 Task 17: train on SemCor, adapt without labels on the domain documents, and evaluate against gold domain senses. We report F1 and expected calibration error. Using the source and target sense distributions, we split lemmas into two groups. One is prior-shift lemmas, whose dominant sense changes but whose context signature stays stable. The other is drift lemmas, where a source-trained classifier stays wrong even after oracle prior correction. The oracle-prior diagonal model makes this split operational.
The prediction is concrete. Full and diagonal adaptation should tie on prior-shift lemmas, and full adaptation should win on drift lemmas. A uniform gain across both groups would instead suggest the win comes from something other than the claimed mechanism, such as the extra degrees of freedom acting as generic regularization.
The second experiment is a controlled shift built from SemCor itself. We resample it to impose a pure frequency shift. We then separately impose a context drift by substituting domain-flavored contexts for chosen senses. The full model should recover the diagonal model's accuracy under pure frequency shift and exceed it only under drift.
As a small out-of-domain probe, we annotate a few hundred occurrences of polysemous financial terms such as "charges" and "couverture" drawn from DOLFIN documents (Mariam Nakhlé et al.). On this probe we measure whether adapting $\rho_d$ on unlabeled financial sections fixes the general-sense errors DOLFIN exposed.
We also report ALL-set F1 to confirm source accuracy is preserved. We test the entropy-versus-error correlation per lemma. Finally, we compare accuracy on a physical device against the simulator on a fixed 500-item subset.
The decisive check is the drift-lemma gap between full and diagonal adaptation, together with the gap between full and real-valued adaptation. If both are positive and survive on hardware within noise, density-operator priors earn a place in domain adaptation. If only the first is positive, the contribution is a classical rotation-based adaptation method that the quantum formalism helped us find. If neither is positive, we will have shown that quantum-inspired disambiguation gains do not transfer to domain shift, and that result is also worth publishing.
References
- SemEval-2010 Task 17: All-words Word Sense Disambiguation on a Specific Domain
- DO-EM: Density Operator Expectation Maximization
- Quantum-Inspired Representation for Long-Tail Senses of Word Sense Disambiguation
- Quantum Interference Model for Semantic Biases of Glosses in Word Sense Disambiguation
- Quantum-inspired Non-homologous Representation Constraint Mechanism for Long-tail Senses of Word Sense Disambiguation
- When BERT Meets Quantum Temporal Convolution Learning for Text Classification in Heterogeneous Computing
- Quantum Methods for Managing Ambiguity in Natural Language Processing
- Quantum Generative Adversarial Networks in a Silicon Photonic Chip with Maximum Expressibility
- PennyLane: Automatic differentiation of hybrid quantum-classical computations
- Quantum deep learning in neuroinformatics: a systematic review
- Code and Named Entity Recognition in StackOverflow
- Computational Advantage in Hybrid Quantum Neural Networks: Myth or Reality?
- Entity Decomposition with Filtering: A Zero-Shot Clinical Named Entity Recognition Framework
- DOLFIN - Document-Level Financial Test-Set for Machine Translation