Contextuality Lives in the Frustrated Part: Submodular Certification of Quantum Negativity at Scale

Some measurement statistics from a quantum device cannot be explained by any classical model in which every quantity has a fixed value, whatever else is measured alongside it. This is contextuality. It can be restated as a statement about quasi-probabilities, meaning probability tables that are allowed to contain negative entries. A device is contextual exactly when every table over global value assignments that reproduces its measured statistics must contain some negative entries. The smallest total amount of negativity is a natural measure of how non-classical the device is.

Computing that measure, or even certifying that it is non-zero, requires the classical bound of a witness: the best score any fixed value assignment can reach. That is an optimization over all $2^n$ assignments. This is a main reason contextuality certificates have stayed at a handful of levels. We propose to split each witness into two parts. One part is submodular, a "diminishing returns" set function that can be minimized exactly in polynomial time through its convex Lovász extension. The other part is non-submodular, and we call it frustrated. We will show that all of the quantum violation lives in the frustrated part. Certification then costs exponential time only in the size of a small frustrated core rather than in the number of qubits.

Core Claim

Consider binary observables $A_1,\dots,A_n$ grouped into contexts $C$, which are small sets of jointly measurable observables. A global assignment is a subset $S\subseteq\{1,\dots,n\}$ listing the observables that take value 1. A quasi-probability model is a signed weight $q(S)$ whose marginal on each context matches the observed statistics $p_C$. The minimal negativity is the smallest $\|q\|_1$ over such models, minus one. A classical explanation exists exactly when this minimum equals 1.

By linear programming duality, negativity exceeds zero exactly when some witness, a set of per-context coefficients $w_C$, satisfies

$$\sum_C \langle w_C, p_C\rangle > 1 \quad\text{while}\quad |W_w(S)| \le 1 \ \text{for all } S,\qquad W_w(S)=\sum_C w_C(S\cap C).$$

Here $W_w(S)$ is the score that assignment $S$ receives. Every hard step is an extremum of the pseudo-Boolean function $W_w$ over subsets.

Our first claim is a structural theorem. If $W_w$ is submodular, possibly after relabeling some observables $A_i \to 1-A_i$, then no behavior with consistent marginals can violate the witness. This rules out every quantum behavior. The argument uses a known fact from valued constraint satisfaction: the relaxation that only requires marginals to agree on overlapping contexts is exact for submodular objectives. Quantum statistics lie inside that relaxation, so their minimum score equals the classical minimum.

Contextuality therefore requires frustration: the witness must be non-submodular under every relabeling. This is the combinatorial version of the odd-cycle structure behind the familiar five-observable tests.

Our second claim is algorithmic. Write $W_w = G - H$ with $G,H$ submodular. The exact classical bound can be computed by branching over a frustration core $K$. $K$ is a set of observables whose fixing leaves a submodular remainder, and each of the $2^{|K|}$ branches is minimized exactly through the Lovász extension. The total cost is $2^{|K|}\,\mathrm{poly}(n)$ instead of $2^n$.

Relation to Prior Work

The motivation comes from experiments that certify contextuality only in small systems. Experimental test of high-dimensional quantum contextuality based on contextuality concentration measures 13 variables on a single qutrit. Experimental Implementation of Dimension-Dependent Contextuality Inequality certifies dimension four using a CGLMP4 value of $0.3631\pm0.01$ against a qutrit bound of $0.315$. Experimental approach to demonstrating contextuality for qudits adds a penalty term to the classical bound to absorb noise. All three rely on classical bounds derived by hand or by enumeration. We replace both with an algorithm whose cost depends on frustration, not size.

Negativity as the measure comes from two sources. Non-locality and entanglement in multi-qubit systems from a unified framework ties Bell violation to the appearance of negative pseudoprobabilities. Tsutsui's observation, summarized in the file, is that negative components cancel in the marginals. Neither provides a way to compute minimal negativity for many observables, and that computation is what we build.

The method comes from combinatorial optimization. Structured sparsity-inducing norms through submodular functions establishes the Lovász extension as the convex envelope of submodular set functions and the way to minimize them exactly. Difference of submodular minimization via DC programming lifts $G-H$ problems into difference-of-convex programs through the Lovász extension. It solves them with a complete DC algorithm with regularization $\rho>0$, beating greedy and modular baselines on speech selection and Mushroom feature selection. We reuse that solver as the column-generation pricing step. We use it only as a heuristic that proposes assignments, never as the certificate, because it finds stationary points rather than global optima.

On the application side, Experimental Certification of Random Numbers via Quantum Contextuality shows why certified violations are worth having. Enhancing Generative Models via Quantum Correlations attributes a quasi-polynomial expressive separation over hidden Markov models to contextuality but never measures it in trained models. We treat that as an optional downstream probe.

Nothing in the file joins contextuality, quasi-probability and the Lovász extension. The closest pairing is El Halabi et al.'s classical probabilistic DS objectives, which involve no signed measures and no quantum constraints.

Research Program

The theoretical part has two goals. The first is to prove the no-violation theorem for arbitrary context sizes with binary outcomes, and to test whether it extends to multi-outcome observables through lattice-submodularity. The second is to characterize the minimal frustration core for the standard families: cycles, Peres–Mermin squares, and stabilizer contexts on rings and 2D grids. We will bound $|K|$ in terms of cycle structure.

The algorithmic part has three stages.

  1. Column generation (primal). Solve the minimal-negativity problem over a growing set of assignments. Each restricted solution is a valid quasi-probability model, so it gives an upper bound on negativity.
  2. Pricing (proposing new assignments). At each round, look for the assignments that most violate $|W_w(S)|\le 1$. The complete DC algorithm on the Lovász-extended $G-H$ does this, and subgradients come from sorting in $O(n\log n)$.
  3. Certification. Take the final witness and compute its exact classical extrema by branching on $K$ with exact submodular minimization in each branch. This gives a rigorous lower bound on negativity.

Finite-shot statistical error enters through a concentration bound on $\sum_C\langle w_C,\hat p_C\rangle$. Following Sohbi et al., the witness is fit on one half of the data and evaluated on the other half.

Baselines

The naive reference point is fixed witnesses. These are the textbook witnesses for each scenario: the KCBS sum, the Peres–Mermin parity sum, and stabilizer-based sums with analytically known classical bounds. They are evaluated on the same simulated data, with no optimization. They show what one gets without learning a witness adapted to the noise.

The strongest exact competitor is enumeration and integer programming. For $n\lesssim 25$, the full linear program over all $2^n$ assignments gives exact negativity. Beyond that, a mixed-integer solver computes the classical bound of the same witness. Both get the same data and the same wall-clock budget. Beating them means matching their certified value wherever they finish, and certifying non-zero negativity at register sizes where they time out.

We found no reported negativity or certification result on Lacuna for registers larger than four levels. The only reported number is the CGLMP4 value $0.3631\pm0.01$ against a qutrit bound of $0.315$ in Experimental Implementation of Dimension-Dependent Contextuality Inequality. We will reproduce that scenario's classical bound exactly as a correctness check.

The pricing baselines are the SubSup, SupSub and ModMod procedures from El Halabi et al., plus simulated annealing. Each gets an equal number of function evaluations, and we compare how many column-generation rounds they need.

Two ablations isolate the key ingredient. The first certifies without the decomposition, branching on all variables. This measures what the frustration core saves. The second keeps the decomposition but uses the DC solver's value as the "bound." This shows how often an uncertified bound would wrongly claim a violation.

Why not just…?

Why not just bound the classical value with a semidefinite relaxation? Semidefinite relaxations are cheap and scale well. But any relaxation that contains the quantum set gives a classical bound at least as large as the quantum value, so it can never certify a violation. For exclusivity-graph witnesses the natural semidefinite bound is the Lovász theta number, which is exactly the quantum value. Certification needs an exact classical bound, and exactness on the submodular part is what our approach provides. We will verify this failure numerically on the Yu–Oh and KCBS scenarios.

Why not just hand the classical bound to an integer-programming solver? This is a real threat at moderate sizes, since mature solvers exploit the same structure implicitly. Our experiments therefore include a head-to-head scaling curve on ring and 2D-grid stabilizer scenarios. If the solver keeps pace with frustration-core branching up to hundreds of qubits, the algorithmic claim fails. The structural theorem and the frustration diagnosis would remain.

Why not just use analytic witnesses with known bounds? For ideal states they are optimal and free. Under depolarizing and readout noise, however, a fixed witness can lose its violation while the negativity is still clearly non-zero. We will measure the noise threshold at which each method stops certifying. If fixed witnesses certify up to the same threshold, learning the witness adds nothing, and we will say so.

Proposed Experiments

Small scenarios, exact comparison. Scenarios with exact enumeration are the five-observable cycle, the Peres–Mermin square, the 13-observable qutrit set of Zu et al., and the CGLMP-type scenario. On these we check that column generation plus certification reproduces the exact minimal negativity to solver tolerance. We also check that frustration cores match the theory.

Numerical test of the theorem. We sample random submodular witnesses and random qubit and qutrit states and measurements, and confirm that no violation ever appears. We run the same sampling on random frustrated witnesses and confirm that violations do appear.

Scaling. We simulate $n$-qubit graph-state stabilizer contexts on rings and 2D grids, from 10 to 1000 qubits, using efficient Clifford simulation, under depolarizing and readout noise at several shot counts. We report five quantities:

  • the certified negativity lower bound;
  • the gap to the primal upper bound;
  • the violation in standard deviations on held-out shots;
  • $|K|$;
  • runtime.

The decisive outcome has two parts. First, certified non-zero negativity at sizes where integer programming times out. Second, a noise threshold above the one fixed witnesses reach.

The decisive falsifier is a frustration core that grows linearly with $n$ on 2D grids. In that case exponential cost returns and the method's advantage is confined to low-frustration geometries. We will report this outcome either way.

Solver validation. On the Mushroom benchmark (8,124 instances, 118 binary features) we check that our DC implementation reproduces the ordering El Halabi et al. report over their baselines, with CDCA below SubSup, SupSub and ModMod. The file reports no numerical objective endpoint for this benchmark.

Optional generative-model probe. We fit basis-enhanced circuits in the style of Enhancing Generative Models via Quantum Correlations to SPECT Heart and Promoter Gene Sequences, the two datasets where that paper reports gains over hidden Markov models. Their KL divergences are not quoted numerically. We then ask whether the learned statistics under multiple local bases carry certified negativity. This probe is only meaningful where the model defines statistics for several compatible measurement settings per site, and we will state that limitation.