Semantic Wave Functions: Exploring Meaning in Large Language Models Through Quantum Formalism

Timo Aukusti Laine
3/9/2025
cs.CLcs.LGquant-ph

No confident code implementation found for this paper. 6 possible matches can be shown below.

Abstract

Large Language Models (LLMs) encode semantic relationships in high-dimensional vector embeddings. This paper explores the analogy between LLM embedding spaces and quantum mechanics, positing that LLMs operate within a quantized semantic space where words and phrases behave as quantum states. To capture nuanced semantic interference effects, we extend the standard real-valued embedding space to the complex domain, drawing parallels to the double-slit experiment. We introduce a "semantic wave function" to formalize this quantum-derived representation and utilize potential landscapes, such as the double-well potential, to model semantic ambiguity. Furthermore, we propose a complex-valued similarity measure that incorporates both magnitude and phase information, enabling a more sensitive comparison of semantic representations. We develop a path integral formalism, based on a nonlinear Schrödinger equation with a gauge field and Mexican hat potential, to model the dynamic evolution of LLM behavior. This interdisciplinary approach offers a new theoretical framework for understanding and potentially manipulating LLMs, with the goal of advancing both artificial and natural language understanding.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 6 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{laine2025semantic,
  title  = {Semantic Wave Functions: Exploring Meaning in Large Language Models Through Quantum Formalism},
  author = {Timo Aukusti Laine},
  year   = {2025},
  eprint = {2503.10664},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.10664v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.10664.svg)](https://codeofpaper.com/paper/2503.10664)

Discussion