KLVY Compiler for Compiled Nonlocal Games
- The KLVY compiler is a method for transforming any k‑prover nonlocal game into a sequential single‑prover protocol using quantum homomorphic encryption.
- It achieves quantitative quantum soundness by ensuring the compiled protocol’s acceptance probability closely matches the original game’s quantum value within a negligible margin.
- The framework employs a sequential NPA hierarchy and geometric regularization to enforce cryptographic non‑signaling and recover valid moment matrices for robust security.
Searching arXiv for the KLVY compiler and closely related papers on compiled nonlocal games, quantum soundness, and the associated sequential NPA framework. The KLVY compiler most specifically denotes the Kalai–Lee–Vidick–Yuen compiler introduced in the context of compiled nonlocal games: a procedure that maps any -prover nonlocal game to a sequential, interactive single-prover protocol by using a quantum homomorphic encryption scheme . Its central purpose is to transfer the power of Bell-type multi-prover tests into a single-device setting by replacing spatial separation with cryptography. In the compiled protocol, the verifier generates a secret key, samples questions , sends in the first rounds, sends in the clear in the last round, decrypts the encrypted answers, and evaluates the same predicate on the transcript . The corresponding security target is quantitative quantum soundness: an efficient single-device quantum prover should not exceed the original game’s quantum value, up to a negligible slack determined by the cryptographic parameters and the hierarchy level used in the analysis (Baroni et al., 29 Sep 2025).
1. Compilation of nonlocal games into single-device protocols
A 0-prover nonlocal game 1 is specified by question alphabets 2, answer alphabets 3, a distribution 4 on 5, and a predicate 6 deciding win or lose. In the spatially separated model, prover 7 receives 8 and returns 9, and the verifier’s acceptance probability is determined by the payoff tensor 0 (Baroni et al., 29 Sep 2025).
The KLVY compiler transforms this game into a sequential protocol with the same underlying predicate. At security parameter 1, the verifier runs 2 to generate a secret key 3, samples 4, and proceeds in 5 rounds. For rounds 6, the verifier sends 7, receives an encrypted answer 8, and later decrypts 9. In the last round 0, the verifier sends 1 in the clear and receives 2. The acceptance decision is again computed using 3.
The intended effect is computational non-signaling across the 4 interfaces. Although only one physical device participates and does so sequentially, the encryption is meant to hide earlier questions and answers from later or earlier parts of the device’s computation. The compilation therefore replaces space-like separation by cryptographic hardness rather than by physical isolation. A plausible implication is that the KLVY compiler is best understood as a cryptographic simulation of the non-signaling structure that underlies nonlocal-game soundness arguments.
2. Quantum values and quantitative quantum soundness
The relevant reference values are the tensor-product quantum value
5
and the commuting-operator value
6
In the compiled setting, an efficient single-prover strategy 7 induces conditional distributions 8, and the compiled acceptance probability is
9
Quantitative soundness seeks an inequality of the form
0
where 1 and 2 is negligible in 3 but also depends on the number of parties 4, the number of rounds 5, alphabet sizes, the hierarchy truncation level 6, and QHE parameters such as ciphertext expansion, supported homomorphic depth, and security (Baroni et al., 29 Sep 2025).
The main quantitative soundness theorem has two regimes. In the finite-dimensional optimality regime, if 7 admits a finite-dimensional optimal quantum strategy and hence 8, then there exists a negligible function 9 such that
0
In the general regime, for every 1 there exists a negligible function 2 such that
3
where 4 is the optimal value of the 5-partite sequential NPA SDP and satisfies 6 as 7 (Baroni et al., 29 Sep 2025).
These statements recover the bipartite quantitative bounds of Klep et al. (2025) when 8 and strictly extend the asymptotic multipartite results of Baroni et al. (2025) to quantitative bounds for finite 9. The significance is not merely asymptotic convergence: the theorem supplies an explicit negligible slack for fixed security parameter and fixed truncation level.
3. Sequential NPA hierarchy for quantum instruments
The technical framework replaces the standard measurement-only perspective with a Heisenberg-picture formalism based on quantum instruments. For party 0, a quantum instrument is a collection 1 of completely positive trace-non-increasing maps such that 2 is completely positive and trace-preserving. In the sequential compiled model, parties act in the order 3, with the last party 4 represented by POVM effects 5, and earlier parties represented by instrument maps transforming later parties’ operators (Baroni et al., 29 Sep 2025).
Operationally non-signaling for party 6 means that the marginal channel is independent of the question:
7
This is the sequential analogue of the non-signaling condition that the compiler seeks to enforce computationally.
At hierarchy level 8, one defines, for each layer 9, a universal 0-algebra 1 generated by symbols 2 satisfying projective measurement relations and causal non-signaling completeness relations for all prefixes. Sequential 3-homomorphisms
4
encode ordered instrument application. Let 5 be the set of words of degree at most 6. The level-7 moment matrix 8 is indexed by 9 and defined by a positive linear functional 0 via
1
Its entries 2 are the correlations 3, and the objective function is the game payoff.
The 4-partite sequential NPA SDP maximizes
5
subject to three classes of constraints: positive semidefiniteness and normalization, Hankel consistency, and operationally non-signaling identities at every layer 6. The hierarchy is strictly feasible at every level and complete with respect to 7-partite commuting-observable strategies, equivalently operationally non-signaling sequential strategies. Its values satisfy 8 as 9 (Baroni et al., 29 Sep 2025).
A further structural feature is the flatness criterion. A game admits a flat optimal solution to the level-0 hierarchy if and only if it admits a finite-dimensional optimal quantum strategy; in that case there exists 1 such that 2. This criterion is what allows the general 3 bound to collapse to the sharper 4 bound in the finite-dimensional regime.
4. Pseudo-solutions, geometric regularization, and proof architecture
For an efficient compiled strategy 5, the associated algebraic Heisenberg-picture state 6 on 7 defines a “pseudo-solution” 8 with entries
9
This matrix is positive semidefinite and normalized, but it satisfies the non-signaling constraints only weakly: for each party 00 and all test polynomials 01 of total degree at most 02, the violation is bounded by a negligible function of 03 (Baroni et al., 29 Sep 2025).
To aggregate all such violations, the analysis introduces a linear constraint-testing map
04
which stacks the Hankel equalities and all operationally non-signaling constraints. Feasibility is equivalent to belonging to 05, and the pseudo-solution satisfies
06
The conversion from pseudo-solution to feasible hierarchy point proceeds by a three-step geometric decomposition.
First, one projects onto the affine constraint subspace:
07
and defines
08
This enforces all linear constraints exactly, with operator-norm loss controlled by 09 and the constraint-violation norm.
Second, one restores positivity by strict feasibility. If 10 is a strictly feasible point with minimum eigenvalue 11, and 12, then one forms the convex mixture
13
Weyl’s inequality and the lower bound on the smallest eigenvalue imply 14.
Third, one renormalizes:
15
All non-normalization constraints are homogeneous and therefore preserved, while the normalization error produces only an additional negligible loss.
The payoff is linear in the moment matrix entries, so operator-norm closeness between 16 and the feasible 17 translates directly into a soundness bound:
18
If flatness holds at some finite level, the same proof yields
19
5. Parameters, efficiency, and scope of applicability
The negligible slack in the quantitative soundness bound is computational rather than information-theoretic. It depends on the verifier’s computational security parameter 20, the QHE scheme’s semantic security and correctness for the required homomorphic circuit depth, the ciphertext length, the evaluation noise budget, the alphabet sizes 21 and 22, the number of parties 23, the number of rounds 24, and the hierarchy truncation level 25 (Baroni et al., 29 Sep 2025).
The level-26 SDP grows with 27, 28, 29, and 30 through the word sets 31. The paper notes that low levels can already be numerically tractable, and that strict feasibility guarantees robust primal solutions. On the protocol side, compiling a 32-prover game produces 33 sequential rounds; the first 34 rounds involve QHE ciphertexts. Communication per round is 35 bits for indices, plus the quantum or classical ciphertext overhead determined by the QHE scheme. The verifier’s time is dominated by 36 operations and sampling from 37, while the prover’s time is quantum polynomial time with homomorphic evaluation depth matching the game’s per-round computation.
The framework is especially motivated by multipartite nonlocality, which exhibits phenomena with no bipartite analogue. The GHZ game is singled out as an example: because 38 while 39, the quantitative finite-dimensional bound becomes
40
More generally, increasing 41 drives the negligible slack downward, while increasing 42 tightens 43 toward 44.
The principal limitations are equally explicit. Quantitative soundness relies on the underlying QHE assumptions and on the efficiency of the prover strategy. The hierarchy-based bound depends on the chosen truncation level 45, and achieving the sharper 46 certificate requires flatness, hence finite-dimensional optimality. The growth of the word sets constrains practical SDP sizes, and numerical solvers may return convex mixtures even though strict feasibility and a finite-level stopping criterion are available (Baroni et al., 29 Sep 2025).
6. Terminological ambiguity and adjacent uses
A recurrent source of confusion is that unrelated technical explainers also use the label “KLVY Compiler.” One such use refers to “CompilerKV,” described as a compiler-like framework for risk-adaptive KV cache retention under tight memory budgets in long-context LLMs; its core artifacts are a Head Heterogeneity Table and a Risk-Adaptive Threshold Gating table learned offline and deployed as lookup tables during prefill-only compression (Yang et al., 9 Feb 2026).
Another unrelated use applies the label to the Calyx compiler, an open-source intermediate language and compiler infrastructure for accelerator generators. Calyx employs a split representation consisting of a hardware-like structural IR and a software-like control IR, lowers control constructs to finite-state machines, and emits synthesizable hardware descriptions (Nigam et al., 2021).
These systems belong to different research areas—respectively long-context LLM inference and hardware compilation—and are not the KLVY compiler of compiled nonlocal games in the sense of Kalai–Lee–Vidick–Yuen. A plausible implication is that the term should be interpreted through context: in quantum cryptography and nonlocal-game compilation, it denotes the QHE-based single-device compiler analyzed via sequential NPA methods; in the other two cases, it is a secondary label attached to otherwise distinct systems.