Papers › A quantum semantic framework for natural language processing

A quantum semantic framework for natural language processing

11 Jun 2025arXiv:2506.10077archive 2025-07-28

Christopher J. Agostino, Quan Le Thien, Molly Apsel, Denizhan Pak, Elina Lesyk, Ashabari Majumdar

Semantic degeneracy represents a fundamental property of natural language that extends beyond simple polysemy to encompass the combinatorial explosion of potential interpretations that emerges as semantic expressions increase in complexity. Large Language Models (LLMs) and other modern NLP systems face inherent limitations precisely because they operate within natural language itself, making them subject to the same interpretive constraints imposed by semantic degeneracy. In this work, we argue using Kolmogorov complexity that as an expression's complexity grows, the likelihood of any interpreting agent (human or LLM-powered AI) recovering the single intended meaning vanishes. This computational intractability suggests the classical view that linguistic forms possess meaning in and of themselves is flawed. We alternatively posit that meaning is instead actualized through an observer-dependent interpretive act. To test this, we conducted a semantic Bell inequality test using diverse LLM agents as ``computational cognitive systems'' to interpret ambiguous word pairs under varied contextual settings. Across several independent experiments, we found average CHSH expectation values ranging from 1.2 to 2.8, with several runs yielding values (e.g., 2.3-2.4) that significantly violate the classical boundary (|S|≤2). This demonstrates that linguistic interpretation under ambiguity can exhibit non-classical contextuality, consistent with results from human cognition experiments. These results inherently imply that classical frequentist-based analytical approaches for natural language are necessarily lossy. Instead, we propose that Bayesian-style repeated sampling approaches can provide more practically useful and appropriate characterizations of linguistic meaning in context.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 22 code samples harvested from 1 repository linked to this paper: 16 ran (of which 0 constructed an object rather than computing a result; 16 with no instrument failure: 0 honoured, 0 violated, 16 with no contract checked; 0 where Syntology's instrument failed) · 6 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code; here there are none.

By repository: official repository: 22 samples from 1 repository, 16 ran (16 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

npc-worldwide/npcpy officialmentioned in papermentioned on GitHubMITSyntology: 22 samples, 16 ran (0 instrument-failed) · 6 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

22 samples harvested: 16 ran (of which 0 constructed an object rather than computing a result; 16 with no instrument failure: 0 honoured, 0 violated, 16 with no contract checked; 0 where Syntology's instrument failed) · 6 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

16ran
6unverified

Licence: 0 of the 22 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from npc-worldwide/npcpy. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

npc-worldwide/npcpy official repository 22 samples, 16 ran (0 instrument-failed) · 6 unverified
agent_pass_handler npcpy/npc_compiler.py ran MIT (permissive) · 6bf1b81aee20da6c · report fixture: signature command:str/0/str, extracted_data:dict/0/?, npc:StandInNPC/0/?, team:StandInTeam/0/?, messages:list/1/dict, context:dict/0/?, stream:bool/0/bool · returned dict · level recorded 2026-09-25
agents_to_npc npcpy/convert.py ran MIT (permissive) · 2c49af830e973cdf · report fixture: signature agents_path:str/0/str, out_dir:str/0/str, team_path:NoneType/0/?, interactive:bool/0/bool · returned list · level recorded 2026-09-25
check_internet_connection npcpy/npc_sysenv.py ran fingerprinted MIT (permissive) · fbaa0111f3bcded7 · report fixture: signature timeout:int/0/int · returned bool · level recorded 2026-09-25
create_model_genome npcpy/ft/model_ensembler.py ran MIT (permissive) · dcce9ec0ef40fcea · report fixture: signature specializations:list/1/str, base_model:str/0/str · returned list · level recorded 2026-09-25
deep_to_dict npcpy/db.py ran MIT (permissive) · c59cdabeb1e36349 · report fixture: signature obj:dict/0/? · returned dict · level recorded 2026-09-25
discover_team_path npcpy/mcp_server.py ran MIT (permissive) · 2e51a3e5f05db351 · report fixture: signature explicit_path:NoneType/0/? · returned str · level recorded 2026-09-25
ensure_engine npcpy/db.py ran MIT (permissive) · 3d4a6cd6dc9565d2 · report fixture: signature conn:str/0/str · returned Engine · level recorded 2026-09-25
find_file_path npcpy/npc_compiler.py ran MIT (permissive) · f870dadfa59bd668 · report fixture: signature filename:str/0/str, search_dirs:list/1/str, suffix:NoneType/0/? · returned str · level recorded 2026-09-25
generate_trigger_patterns npcpy/ft/model_ensembler.py ran fingerprinted MIT (permissive) · 986a0476abbe5ebc · report fixture: signature specialization:str/0/str · returned list · level recorded 2026-09-25
get_locally_available_models npcpy/npc_sysenv.py ran MIT (permissive) · 6b18d725a9a080c4 · report fixture: signature project_directory:str/0/str, airplane_mode:bool/0/bool, gguf_dir:NoneType/0/? · returned dict · level recorded 2026-09-25
mutate_model_genome npcpy/ft/model_ensembler.py ran MIT (permissive) · 82be464560deb08f · report fixture: signature genome:list/1/ModelGene, mutation_type:str/0/str · returned list · level recorded 2026-09-25
normalize_path_for_db npcpy/db.py ran fingerprinted MIT (permissive) · 4216e682e01ce361 · report fixture: signature path_str:str/0/str · returned str · level recorded 2026-09-25
predict_model npcpy/ml_funcs.py ran MIT (permissive) · e40738e766337909 · report fixture: signature X:ndarray/2/float, model:callable/0/?, n_samples:int/0/int, matrix:NoneType/0/?, parallel:bool/0/bool, method:str/0/str · returned dict · level recorded 2026-09-25
preprocess_code_block npcpy/npc_sysenv.py ran fingerprinted MIT (permissive) · 1f56682cc0c1c17d · report fixture: signature code_text:str/0/str · returned str · level recorded 2026-09-25
score_model npcpy/ml_funcs.py ran MIT (permissive) · 9a51adc831b11eac · report fixture: signature X:ndarray/2/float, y:ndarray/1/int, model:DummyModel/0/?, metrics:list/1/str, parallel:bool/0/bool · returned dict · level recorded 2026-09-25
skill_to_jinx npcpy/convert.py ran MIT (permissive) · c18577e90b0f9d7c · report fixture: signature skill_path:str/0/str, out_dir:str/0/str · returned str · level recorded 2026-09-25
build_server npcpy/mcp_server.py unverified MIT (permissive) · 5523f8e99c99b90e · report
create_or_replace_table npcpy/npc_compiler.py unverified MIT (permissive) · 23123d55db2c128f · report
ensemble_vote npcpy/npc_array.py unverified MIT (permissive) · 38245c4d32f43205 · report
fit_model in 9 papers npcpy/ml_funcs.py unverified MIT (permissive) · f478d181a9352803 · report
infer_matrix npcpy/npc_array.py unverified MIT (permissive) · 04c0ca73d7e0c996 · report
npc_udf npcpy/npc_array.py unverified MIT (permissive) · e45111481f74a143 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections