Introduction
Traditional Language Models (LMs) typically rely on either statistical word distributions or neural distributed representations. While Quantum Language Models (QLM) were previously proposed to integrate mathematical formalisms from quantum theory into NLP, they faced significant limitations. These included a reliance on "one-hot" vectors that ignored global semantic relationships, slow iterative estimation algorithms like Expectation-Maximization, and a fragmented design that prevented end-to-end optimization. This paper introduces the Neural Network based Quantum-like Language Model (NNQLM), a framework that modernizes QLM by making it fully compatible with deep learning architectures and backpropagation.
Methodology: The NNQLM Framework
The core innovation of NNQLM lies in representing sentences as "density matrices" rather than simple vectors. In quantum mechanics, a density matrix represents a "mixed state"; here, it models a sentence as a mixture of semantic subspaces.
Sentence Representation
Each word embedding in a sentence is normalized and converted into an outer product (a dyad). The sentence representation is then formed as a weighted sum of these dyads, resulting in a density matrix $\rho$. This approach captures the "uncertainty" and semantic mixture within a sentence more effectively than a single point in vector space.
Joint Representation and Matching
To compare a question ($q$) and an answer ($a$), the model computes a joint representation matrix $M_{qa} = \rho_q \rho_a$. This matrix encapsulates the inter-sentence similarity across all latent semantic dimensions.
The authors propose two specific architectures:
- NNQLM-I: A simpler version that uses the trace inner product and diagonal elements as features for a softmax classifier.
- NNQLM-II: A more advanced version that treats the joint representation matrix as an image. It employs a 2D Convolutional Neural Network (CNN) to automatically extract complex similarity patterns from the matrix.
Experimental Evaluation
The models were evaluated on the "Answer Selection" task using two benchmark datasets: TREC-QA (Text REtrieval Conference) and WikiQA (open-domain Bing query logs/Wikipedia).
Results and Analysis
The NNQLM-II model demonstrated significant performance improvements over the original QLM and several strong neural baselines. On the TREC-QA dataset, NNQLM-II achieved a Mean Average Precision (MAP) of 0.7589, representing an 11.87% improvement over the baseline QLM. On WikiQA, the improvement was even more pronounced at 27.15%.
The ablation study comparing NNQLM-I and NNQLM-II highlights that the 2D-CNN is essential for capturing the richer similarity features inherent in the quantum-like joint representation. While NNQLM-II achieved state-of-the-art results on TREC-QA, it fell slightly short of the absolute best on WikiQA, likely due to the latter's reliance on structural or syntactic information not explicitly modeled here.
Conclusion
By deriving density matrices analytically from embeddings, the authors have made quantum-inspired NLP computationally practical. The NNQLM framework allows for end-to-end training via backpropagation, bridging the gap between quantum theory and modern deep learning. Future work may involve fine-tuning embeddings within the quantum framework or applying these models to other tasks like natural language inference.
Summary updated