# Beyond the Cabello-Severini-Winter framework: Making sense of contextuality
without sharpness of measurements

Ravi Kunjwal<EMAIL_ADDRESS>Perimeter Institute for
Theoretical Physics,
31 Caroline Street North, Waterloo, Ontario, Canada, N2L 2Y5.

###### Abstract

We develop a hypergraph-theoretic framework for Spekkens contextuality applied
to Kochen-Specker (KS) type scenarios that goes beyond the Cabello-Severini-
Winter (CSW) framework. To do this, we add new hypergraph-theoretic
ingredients to the CSW framework. We then obtain noise-robust noncontextuality
inequalities in this generalized framework by applying the assumption of
(Spekkens) noncontextuality to both preparations and measurements. The
resulting framework goes beyond the CSW framework in both senses, conceptual
and technical. On the conceptual level: 1) as in any treatment based on the
generalized notion of noncontextuality à la Spekkens, we relax the assumption
of outcome determinism inherent to the Kochen-Specker theorem but retain
measurement noncontextuality, besides introducing preparation
noncontextuality, 2) we do not require the exclusivity principle – that
pairwise exclusive measurement events must all be mutually exclusive – as a
fundamental constraint on measurement events of interest in an experimental
test of contextuality, given that this property is not true of general quantum
measurements, and 3) as a result, we do not need to presume that measurement
events of interest are “sharp” (for any definition of sharpness), where this
notion of sharpness is meant to imply the exclusivity principle. On the
technical level, we go beyond the CSW framework in the following senses: 1) we
introduce a source events hypergraph – besides the measurement events
hypergraph usually considered – and define a new operational quantity ${\rm
Corr}$ that appears in our inequalities, 2) we define a new hypergraph
invariant – the weighted max-predictability – that is necessary for our
analysis and appears in our inequalities, and 3) our noise-robust
noncontextuality inequalities quantify tradeoff relations between three
operational quantities – ${\rm Corr}$, $R$, and $p_{0}$ – only one of which
(namely, $R$) corresponds to the Bell-Kochen-Specker functionals appearing in
the CSW framework; when ${\rm Corr}=1$, the inequalities formally reduce to
CSW type bounds on $R$. Along the way, we also consider in detail the scope of
our framework vis-à-vis the CSW framework, particularly the role of Specker’s
principle in the CSW framework, i.e., what the principle means for an
operational theory satisfying it and why we don’t impose it in our framework.

03.65.Ta, 03.65.Ud

###### Contents

  1. 1 Introduction
  2. 2 Spekkens framework
    1. 2.1 Operational theory
    2. 2.2 Ontological model
    3. 2.3 Representation of coarse-graining
      1. 2.3.1 Coarse-graining of measurements
      2. 2.3.2 Coarse-graining of preparations
    4. 2.4 Joint measurability (or compatibility)
    5. 2.5 Noncontextuality
    6. 2.6 An example of Spekkens contextuality: the fair coin flip inequality
    7. 2.7 Connection to Bell scenarios
  3. 3 Hypergraph approach to Kochen-Specker scenarios in the Spekkens framework
    1. 3.1 Measurements
      1. 3.1.1 Classification of probabilistic models
      2. 3.1.2 Distinguishing two consequences of Specker’s principle: Structural Specker’s principle vs. Statistical Specker’s principle
      3. 3.1.3 What does it mean for an operational theory to satisfy structural/statistical Specker’s principle?
      4. 3.1.4 Remark on the classification of probabilistic models: why we haven’t defined “quantum models” as those obtained from projective measurements
      5. 3.1.5 Scope of this framework
    2. 3.2 Sources
  4. 4 A key hypergraph invariant: the weighted max-predictability
  5. 5 Noise-robust noncontextuality inequalities
    1. 5.1 Key notions from CSW
    2. 5.2 Key notion not from CSW: source-measurement correlation, ${\rm Corr}$
    3. 5.3 Obtaining the noise-robust noncontextuality inequalities
      1. 5.3.1 Expressing operational quantities in ontological terms
      2. 5.3.2 Derivation of the noncontextual tradeoff for any graph $G$
      3. 5.3.3 When is the noncontextual tradeoff violated?
    4. 5.4 Example: KCBS scenario
  6. 6 Discussion
    1. 6.1 Measurement-measurement correlations vs. source-measurement correlations
    2. 6.2 Can our noise-robust noncontextuality inequalities be saturated by a noncontextual ontological model?
      1. 6.2.1 The special case of facet-defining Bell-KS inequalities: Corr=1
      2. 6.2.2 The general case: ${\rm Corr}<1$
    3. 6.3 Can trivial POVMs ever violate these noncontextuality inequalities?
      1. 6.3.1 The case $p\in\mathcal{C}(\Gamma_{G})$
      2. 6.3.2 The case $p\in{\rm ConvHull}(\mathcal{G}(\Gamma_{G})|_{\rm ind})$
      3. 6.3.3 The general case $p\in\mathcal{G}(\Gamma_{G})$
  7. 7 Conclusions
  8. A Status of KS-contextuality as an experimentally testable notion of nonclassicality for POVMs in quantum theory
    1. A.1 Limitations of KS-contextuality vis-à-vis POVMs
      1. A.1.1 KS-contextuality for POVMs in the literature
      2. A.1.2 Classifying probabilistic models: restriction of quantum models to PVMs
    2. A.2 Robustness of Bell nonlocality vis-à-vis POVMs
  9. B Ontological models without respecting coarse-graining relations
    1. B.1 How to construct a “KS-noncontextual” ontological model of the KCBS experiment [47] without coarse-graining relations
    2. B.2 How to construct a “preparation and measurement noncontextual” ontological model without coarse-graining relations
  10. C Trivial POVMs
    1. C.1 Bell-CHSH scenario
    2. C.2 CHSH-type contextuality scenario: 4-cycle
  11. D The KS-uncolourable hypergraph $\Gamma_{18}$

##  1 Introduction

To say that quantum theory is counterintuitive, or that it requires a revision
of our classical intuitions, requires us to be mathematically precise in our
definition of these classical intuitions. Once we have a precise formulation
of such classicality, we can begin to investigate those features of quantum
theory that power its nonclassicality, i.e., its departure from our classical
intuitions, and thus prove theorems about such nonclassicality. To the extent
that a physical theory is provisional, likely to be replaced by a better
theory in the future, it also makes sense to articulate such notions of
classicality in as operational a manner as possible. By ‘operational’, we
refer to a formulation of the theory that takes the operations – preparations,
measurements, transformations – that can be carried out in an experiment as
primitives and which specifies the manner in which these operations combine to
produce the data in the experiment. Such an operational formulation often
suggests generalizations of the theory that can then be used to better
understand its axiomatics [1, 2, 3]. At the same time, an operational
formulation also lets us articulate our notions of nonclassicality in a manner
that is experimentally testable and thus allows us to leverage this
nonclassicality in applications of the theory. Indeed, a key area of research
in quantum foundations and quantum information is the development of methods
to assess nonclassicality in an experiment under minimal assumptions on the
operational theory describing it. The paradigmatic example of this is the case
of Bell’s theorem and Bell experiments [4, 5, 6, 7, 8, 9, 10, 11], where any
operational theory that is non-signalling between the different spacelike
separated wings of the experiment is allowed. The notion of classicality at
play in Bell’s theorem is the assumption of local causality: any non-
signalling theory that violates the assumption of local causality is said to
exhibit nonclassicality by the lights of Bell’s theorem.

More recently, much work [12, 13, 14, 15, 16, 17] has been devoted to
obtaining constraints on operational statistics that follow from a generalized
notion of noncontextuality proposed by Spekkens [18]. This notion of
classicality [18] has its roots in the Kochen-Specker (KS) theorem [19], a no-
go theorem that rules out the possibility that a deterministic underlying
ontological model [20] could reproduce the operational statistics of
(projective) quantum measurements in a manner that satisfies the assumption of
KS-noncontextuality. KS-noncontextuality is the notion of classicality at play
in the Kochen-Specker theorem. The Spekkens framework abandons the assumption
of outcome determinism [18] – the idea that the ontic state of a system fixes
the outcome of any measurement deterministically – that is intrinsic to KS-
noncontextuality. It also applies to general operational theories and extends
the notion of noncontextuality to general experimental procedures –
preparations, transformations, and measurements – rather than measurements
alone.

Parallel to work along the lines of Spekkens [18], work seeking to directly
operationalize the Kochen-Specker theorem (rather than revising the notion of
noncontextuality at play) culminated in two recent approaches that classify
theories by the degree to which they violate the assumption of KS-
noncontextuality: the graph-theoretic framework of Cabello, Severini, and
Winter (CSW) [21, 22], where a general approach to obtaining graph-theoretic
bounds on linear Bell-KS functionals was proposed, and the related hypergraph
framework of Acín, Fritz, Leverrier, and Sainz (AFLS) [23], where an approach
to characterizing sets of correlations was proposed. The CSW framework relates
well-known graph invariants to: 1) upper bounds on Bell-KS inequalities that
follow from KS-noncontextuality, 2) upper bounds on maximum quantum violations
of these inequalities that can be obtained from projective measurements, and
3) upper bounds on their violation in general probabilistic theories [24] –
denoted $E1$ – which satisfy the “exclusivity principle” [22]. Complementary
to this, the AFLS framework uses graph invariants in the service of deciding
whether a given assignment of probabilities to measurement outcomes in a KS-
contextuality experiment belongs to a particular set of correlations; they
showed that membership in the quantum set of correlations (defined only for
projective measurements in quantum theory) cannot be witnessed by a graph
invariant, cf. Theorem 5.1.3 of Ref. [23]. Another recent approach due to
Abramsky and Brandenburger [25] employs sheaf-theoretic ideas to formulate KS-
contextuality.

A key achievement of the frameworks of Refs. [22, 23, 25] is a formal
unification of Bell scenarios with KS-contextuality scenarios, treating them
on the same footing. Indeed, the perspective there is to consider Bell
scenarios as a special case of KS-contextuality scenarios. What is lost in
this mathematical unification, however, is the fact that Bell-locality and KS-
noncontextuality have physically distinct, if related, motivations. The
physical situation that Bell’s theorem refers to requires (at least) two
spacelike separated labs (where local measurements are carried out) so that
the assumption of local causality (or Bell-locality) can be applied.111What do
we mean by whether an assumption “can be applied”? Of course, mathematically,
one can “apply” any assumption one wants in the service of proving a theorem.
But insofar as the mathematics here is trying to model a real experiment, the
consistency of those assumptions with some essential facts of the experiment
is the minimal requirement for any no-go theorem derived from such assumptions
to be physically interesting. Hence, in the presence of signalling (implying
the absence of spacelike separation), it makes no sense to assume local
causality in a Bell experiment and derive the resulting Bell inequalities:
such an assumption on the ontological model is already in conflict with the
fact of signalling across the labs and no Bell inequalities are needed to
witness this fact. Bell inequalities only become physically interesting when
the theories being compared relative to them are all non-signalling: if the
experiment itself is signalling, any non-signalling description – locally
causal, quantum, or in a general probabilistic theory (GPT) – is ipso facto
ruled out. On the other hand, the physical situation that the Kochen-Specker
theorem refers to does not require spacelike separation as a necessary
ingredient and one can therefore consider experiments in a single lab.
However, the assumption of KS-noncontextuality entails outcome determinism
[18], something not required by local causality in Bell scenarios.222Note that
this assumption of outcome determinism doesn’t affect the conclusions in a
Bell scenario even if one adopted it because of Fine’s theorem [26]: a locally
deterministic ontological model entails the same set of (Bell-local)
correlations as a locally causal ontological model. Relaxing outcome
determinism, however, doesn’t mean the same thing for the kinds of experiments
envisaged by the Kochen-Specker theorem – in particular, it doesn’t mean that
models satisfying factorizability à la Ref. [25] are the most general outcome-
indeterministic models – and thus considerations parallel to Fine’s theorem
[26] do not apply, cf. [27, 28]. This difference in the physical situation for
the two kinds of experiments is one of the reasons for generalizing KS-
noncontextuality to the notion of noncontextuality in the Spekkens framework
[18] (so that outcome determinism is not assumed) while leaving Bell’s notion
of local causality untouched.

In the present paper we build a bridge from the CSW approach, where KS-
noncontextual correlations are bounded by Bell-KS inequalities, to noise-
robust noncontextuality inequalities in the Spekkens framework [18]. That is,
we show how the constraints from KS-noncontextuality in the framework of Ref.
[22] translate to constraints from generalized noncontextuality in the
framework of Ref. [18]. The resulting operational criteria for contextuality à
la Spekkens are noise-robust and therefore applicable to arbitrary positive
operator-valued measures (POVMs) and mixed states in quantum theory. Note that
the insights gleaned from frameworks such as those of Refs. [22, 23, 25]
regarding Bell nonlocality require no revision in our approach. It is only in
the application of such frameworks (in particular, the CSW framework) to the
question of contextuality that we seek to propose an alternative hypergraph
framework (formalizing Spekkens contextuality [18]) that is more operationally
motivated for experimental situations where one cannot appeal to spacelike
separation to justify locality of the measurements.333Nor the sharpness of the
measurements to justify outcome determinism. We discuss these issues in detail
– in particular, the physical basis of KS-noncontextuality vis-à-vis Bell-
locality and how that influences our framework – in Appendix A for the
interested reader. For Kochen-Specker type experimental scenarios, we will
consider the twin notions of preparation noncontextuality and measurement
noncontextuality – taken together as a notion of classicality – to obtain
noise-robust noncontextuality inequalities that generalize the KS-
noncontextuality inequalities of CSW. These inequalities witness
nonclassicality even when quantum correlations arising from arbitrary (i.e.,
possibly nonprojective) quantum measurements on any quantum state are allowed.
A key innovation of this approach is that it treats all measurements in an
operational theory on an equal footing. No definition of “sharpness” [29, 30,
31] is needed to justify or derive noncontextuality inequalities in this
approach. Furthermore, if certain idealizations are presumed about the
operational statistics, then these inequalities formally recover the usual
Bell-KS inequalities à la CSW. The Bell-KS inequalities can be viewed as an
instance of the classical marginal problem [26, 27, 32, 33, 25], i.e., as
constraints on the (marginal) probability distributions over subsets of a set
of observables that follow from requiring the existence of global joint
probability distribution over the set of all observables. Since the Bell-KS
inequalities are only recovered under certain idealizations, but not
otherwise, the noise-robust noncontextuality inequalities we obtain cannot in
general be viewed as arising from a classical marginal problem. Hence, they
cannot be understood within existing frameworks that rely on this (reduction
to the classical marginal problem) property to formally unify the treatment of
Bell-nonlocality and KS-contextuality [22, 23, 25]. This is a crucial
distinction relative to the usual Bell-KS inequality type witnesses of KS-
contextuality.

This paper is based on a previous contribution [16] that laid the conceptual
groundwork for the progress we make here. Besides the noise-robust
noncontextuality inequalities that generalize constraints from KS-
noncontextuality in the CSW framework leveraging the graph invariants of CSW
[22] (cf. Section 5), the contributions of this paper also include:

  * •

An exposition of Specker’s principle and how different implications of it
(e.g., consistent exclusivity [23]) for a given operational theory arise in
the hypergraph framework (cf. Sections 3.1.2 and 3.1.3), in particular the
results in Theorems 1, 2, and Corollary 1.

  * •

Introduction of a hypergraph invariant – the weighted max-predictability –
that is key to our noise-robust noncontextuality inequalities, cf. Section 4.
This invariant is also key to the hypergraph framework of Ref. [34] which is
complementary to the present framework.

  * •

A detailed discussion of how KS-noncontextuality for POVMs has been previously
treated in the literature and the limitations of those treatments, cf.
Appendices A and C. Also, unlike for the case of KS-noncontextuality
inequalities, we show that trivial POVMs can never violate our noise-robust
noncontextuality inequalities, cf. Section 6.3.

  * •

A discussion of coarse-graining relations in Section 2.3 and their importance
for contextuality no-go theorems, in particular a discussion of ontological
models that do not respect coarse-graining relations in Appendix B. We show,
in Appendix B, how relaxing the constraint from coarse-graining relations on
an ontological model renders either notion of noncontextuality – whether
Kochen-Specker [19] or Spekkens [18] – vacuous.

  * •

A discussion, by example, of why our generalization of the CSW framework
cannot accommodate contextuality scenarios that are KS-uncolourable in
Appendix D and why one needs a distinct framework, i.e., the framework of Ref.
[34], to treat KS-uncolourable scenarios.

The structure of this paper follows: Section 2 reviews the Spekkens framework
for generalized noncontextuality [18]. Section 3 introduces a hypergraph
framework that shares features of traditional frameworks for KS-contextuality
[22, 23] but is also augmented (relative to these traditional frameworks) with
the ingredients necessary for obtaining noise-robust noncontextuality
inequalities. In particular, its subsections 3.1.2 and 3.1.3 discuss Specker’s
principle [35] and define its different implications for contextuality
scenarios à la Ref. [23]. Section 4 defines a new hypergraph invariant – the
weighted max-predictability – that we need later on as a crucial new
ingredient in our inequalities. Section 5 obtains noise-robust
noncontextuality inequalities within the framework defined in Section 3 and
using the hypergraph invariant of Section 4 in addition to two graph
invariants from the CSW framework [22]. These inequalities can be seen as
special cases of the general approach outlined in Ref. [16]. In Section 6, we
include discussions on various features of our noise-robust noncontextuality
inequalities, in particular the fact that trivial POVMs can never violate
them. Section 7 concludes with some open questions and directions for future
research.

##  2 Spekkens framework

We concern ourselves with prepare-and-measure experiments. A schematic of such
an experiment is shown in Figure 1 where, for the sake of simplicity, we
imagine a single source device that can perform any preparation procedure of
interest (rather than a collection of source devices, each implementing a
particular preparation procedure) and a single measurement device that can
perform any measurement procedure of interest (rather than a collection of
measurement devices, each implementing a particular measurement procedure).
Note that this is just a conceptual abstraction: in particular, the various
possible measurement settings on the measurement device may, for example,
correspond to incompatible measurement procedures in quantum theory. The fact
that we represent the different measurement settings by choices of knob
settings $M\in\mathbb{M}$ on a single measurement device does not mean that
it’s physically possible to implement all the measurement procedures
represented by $\mathbb{M}$ jointly; it only means that the experimenter can
choose to implement any of the measurements in the set $\mathbb{M}$ in a
particular prepare-and-measure experiment. The same is true for our
abstraction of preparation procedures to knob settings ($S\in\mathbb{S}$) and
outcomes ($s\in V_{S}$) of a single source device: it’s not that the same
device can physically implement all possible preparation procedures; it’s just
that an experimenter can choose to implement any procedure in the set
$\mathbb{S}$ in a particular prepare-and-measure experiment.

Figure 1: A prepare-and-measure experiment.

We will consider two levels of description of prepare-and-measure experiments
represented by Fig. 1: operational and ontological. The operational
description will be specified by an operational theory that takes source and
measurement devices as primitives and describes the experiment solely in terms
of the probabilities associated to their input/output behaviour. The
ontological description will be specified by an ontological model that takes
the system that passes between the source and measurement devices as primitive
and describes the experiment in terms of probabilities associated to
properties of this system, deriving the operational description as a
consequence of coarse-graining over these properties. Let us look at each
description in turn.

###  2.1 Operational theory

We now describe the various components of Fig. 1 in more detail. The source
device has a source setting labelled by $S$ that can be chosen from a set
$\mathbb{S}$. The set $\mathbb{S}$ represents, in general, some subset of the
set of all source settings, $\mathscr{S}$, that are admissible in the
operational theory, i.e., $\mathbb{S}\subseteq\mathscr{S}$. In a particular
prepare-and-measure experiment, $\mathbb{S}$ will typically be a finite set of
source settings. Choosing the setting $S$ prepares a system according to an
ensemble of preparation procedures, denoted $\\{(p(s|S),P_{[s|S]})\\}_{s\in
V_{S}}$, where $\\{p(s|S)\\}_{s\in V_{S}}$ is a probability distribution over
the preparation procedures $\\{P_{[s|S]}\\}_{s\in V_{S}}$ in the ensemble.
This means that the source device has one classical input $S$ and two outputs:
one output is a classical label $s\in V_{S}$ identifying the preparation
procedure (in the ensemble $\\{(p(s|S),P_{[s|S]})\\}_{s\in V_{S}}$) that is
carried out when source outcome $s$ is observed for source setting $S$ (this
source event is denoted $[s|S]$), and the other output is a system prepared
according to the source event $[s|S]$, i.e., preparation procedure
$P_{[s|S]}$, with probability $p(s|S)$. Thus, the assemblage of possible
ensembles that the source device can prepare can be denoted by
$\\{\\{(p(s|S),P_{[s|S]})\\}_{s\in V_{S}}\\}_{S\in\mathbb{S}}$.

On the other hand, the measurement device has two inputs, one a classical
input $M\in\mathbb{M}$ specifying the choice of measurement setting to be
implemented, and the other input receives the system prepared according to
prepartion procedure $P_{[s|S]}$ and on which this measurement $M$ is carried
out. The measurement device has one classical output $m\in V_{M}$ denoting the
outcome of the measurement $M$ implemented on a system prepared according to
$P_{[s|S]}$, and which occurs with probability $p(m|M,S,s)$. The set
$\mathbb{M}$ represents, in general, some subset of the set of all measurement
settings, $\mathscr{M}$, that are admissible in the operational theory, i.e.,
$\mathbb{M}\subseteq\mathscr{M}$. In a particular prepare-and-measure
experiment, $\mathbb{M}$ will typically be a finite set of measurement
settings.

We will be interested in the operational joint probability $p(m,s|M,S)\equiv
p(m|M,S,s)p(s|S)$ for this prepare-and-measure experiment for various choices
of $M\in\mathbb{M}$, $S\in\mathbb{S}$. Note how this operational description
takes as primitive the operations carried out in the lab and restricts itself
to specifying the probabilities of classical outcomes (i.e., $m,s$) given some
interventions (i.e., classical inputs, $M,S$). So far, we haven’t assumed any
structure on the operational theory describing the schematic of Fig. 1 beyond
the fact that it is a catalogue of input/output probabilities

$\\{\\{p(m,s|M,S)\in[0,1]\\}_{m\in V_{M},s\in
V_{S}}\\}_{M\in\mathbb{M},S\in\mathbb{S}}$

for various interventions $S\in\mathbb{S}$ and $M\in\mathbb{M}$ that we will
consider in a prepare-and-measure experiment. We now require more structure in
the operational theory underlying this experiment, beyond a mere specification
of these probabilities.

We require that the operational theory admits equivalence relations that
partition experimental procedures of any type, whether preparations or
measurements, into equivalence classes of that type. These equivalence
relations are defined relative to the operational probabilities (not
necessarily restricted to a particular prepare-and-measure experiment) that
are admissible in the theory. We will call these equivalence relations
“operational equivalences”, in keeping with standard terminology [18]. This
means that any distinctions of labels between procedures in an equivalence
class of procedures do not affect the operational probabilities associated
with the procedures. We specify these equivalence relations for measurement
and preparation procedures below.

Two measurement events $[m|M]$ and $[m^{\prime}|M^{\prime}]$ are said to be
operationally equivalent, denoted $[m|M]\simeq[m^{\prime}|M^{\prime}]$, if
there exists no source event in the operational theory that can distinguish
them, i.e.,

$p(m,s|M,S)=p(m^{\prime},s|M^{\prime},S)\quad\forall[s|S],s\in
V_{S},S\in\mathscr{S}.$ (1)

Note that the statistical indistinguishability of $[m|M]$ and
$[m^{\prime}|M^{\prime}]$ must hold for all possible source settings
$\mathscr{S}$ in the operational theory, not merely the source settings
$\mathbb{S}$ that are of direct interest in a particular prepare-and-measure
experiment. Hence, the “distinction of labels”, $[m|M]$ or
$[m^{\prime}|M^{\prime}]$, is empirically inconsequential since the two
procedures are, in principle, indistinguishable by the lights of the
operational theory.

Similarly, two source events $[s|S]$ and $[s^{\prime}|S^{\prime}]$ are said to
be operationally equivalent, denoted $[s|S]\simeq[s^{\prime}|S^{\prime}]$, if
there exists no measurement event in the operational theory that can
distinguish them, i.e.,

$\displaystyle p(m,s|M,S)=p(m,s^{\prime}|M,S^{\prime}),$
$\displaystyle\forall[m|M],m\in V_{M},M\in\mathscr{M}.$ (2)

Again, the statistical indistinguishability of $[s|S]$ and
$[s^{\prime}|S^{\prime}]$ must hold for all possible measurement settings
$\mathscr{M}$, not merely those (i.e., $\mathbb{M}$) that are of direct
interest in a particular prepare-and-measure experiment. Similar to
measurement events, the “distinction of labels”, $[s|S]$ or
$[s^{\prime}|S^{\prime}]$, is empirically inconsequential since the two
procedures are, in principle, indistinguishable by the lights of the
operational theory.

Given this equivalence structure for preparation and measurement procedures in
the operational theory, we can now formalize the notion of a context:

######  Definition 1.

A context is any distinction of labels between operationally equivalent
procedures in the operational theory.

To see concrete examples of the kinds of contexts that will be of interest to
us in this paper, consider quantum theory. Any mixed quantum state admits
multiple convex decompositions in terms of other quantum states, i.e., it can
be prepared by coarse-graining over distinct ensembles of quantum states, each
ensemble denoted by a different label. In this case, the “distinction of
labels” between different decompositions denotes a distinction of preparation
ensembles, which instantiates our notion of a preparation context. Similarly,
a given positive operator can be implemented by different positive operator-
valued measures (POVMs), and the distinction of labels denoting these
different POVMs instantiates our notion of a measurement context.

###  2.2 Ontological model

Given the operational description of the experiment in terms of probabilities
$p(m,s|M,S)$, we want to explore the properties of any underlying ontological
model for this operational description. Any such ontological model, defined
within the ontological models framework [20], takes as primitive the physical
system (rather than operations on it) that passes between the source and
measurement devices, i.e., its basic objects are ontic states of the system,
denoted $\lambda\in\Lambda$, that represent intrinsic properties of the
physical system. When a preparation procedure $[s|S]$ is carried out, the
source device samples from the space of ontic states $\Lambda$ according to a
probability distribution $\\{\mu(\lambda|S,s)\in[0,1]\\}_{\lambda\in\Lambda}$,
where $\sum_{\lambda\in\Lambda}\mu(\lambda|S,s)=1$, and the joint distribution
over $s$ and $\lambda$ given $S$, i.e.,
$\\{\mu(\lambda,s|S)\\}_{\lambda\in\Lambda}$, is given by
$\mu(\lambda,s|S)\equiv\mu(\lambda|S,s)p(s|S)$. On the other hand, when a
system in ontic state $\lambda$ is input to the measurement device with
measurement setting $M\in\mathbb{M}$, the probability distribution over the
measurement outcomes is given by $\\{\xi(m|M,\lambda)\in[0,1]\\}_{m\in
V_{M}}$, where $\sum_{m\in V_{M}}\xi(m|M,\lambda)=1$. The operational
statistics

$\\{\\{p(m,s|M,S)\in[0,1]\\}_{m\in V_{M},s\in
V_{S}}\\}_{M\in\mathbb{M},S\in\mathbb{S}}$

results from a coarse-graining over $\lambda$, i.e.,

$p(m,s|M,S)=\sum_{\lambda\in\Lambda}\xi(m|M,\lambda)\mu(\lambda,s|S),$ (3)

for all $m\in V_{M},s\in V_{S},M\in\mathbb{M},S\in\mathbb{S}$.

Note that the definition of an ontological model above extends to the
definition of an ontological model of the operational theory (as opposed to a
particular fragment of the theory representing the experiment) when we take
$\mathbb{M}=\mathscr{M}$ and $\mathbb{S}=\mathscr{S}$.

###  2.3 Representation of coarse-graining

We will now specify how coarse-graining of procedures in a prepare-and-measure
experiment is represented in its description, whether operational or
ontological. Namely, if a procedure is defined as a coarse-graining of other
procedures, then we require that the representation of such a procedure is
defined by the same coarse-graining of the representation of the other
procedures.444Quantum theory is an example of an operational theory that
satisfies this requirement because of the linearity of the Born rule with
respect to both preparations and measurements. The same is true, more
generally, of general probabilistic theories (GPTs) [1, 24]. We require this
feature in any ontological model as well, regardless of its
(non)contextuality. Implicit in this discussion is the assumption that the
operational theory allows one to define new procedures in the set
$\mathscr{M}$ or $\mathscr{S}$ by coarse-graining other procedures in these
sets, i.e., both $\mathscr{M}$ and $\mathscr{S}$ are closed under coarse-
grainings. In particular, one can consider coarse-graining measurement and
source settings (belonging to sets $\mathbb{M}$ and $\mathbb{S}$,
respectively) actually implemented in the lab to define new measurement and
source settings that belong to $\mathscr{M}\backslash\mathbb{M}$ and
$\mathscr{S}\backslash\mathbb{S}$, respectively.555Similarly, we also allow
probabilistic mixtures of (preparation or measurement) procedures in the
operational theory to define new procedures, i.e., the theory is convex. See
the last paragraph of Section 2.5 for the role of this convexity in
experimental tests of contextuality and Section 2.6 for an example where a
probabilistic mixture of measurement settings is required in a proof of
contextuality.

####  2.3.1 Coarse-graining of measurements

Let us see how this works for the case of measurement procedures: if a
measurement procedure $M$ with measurement events $\\{[m|M]\\}_{m\in V_{M}}$
is defined as a coarse-graining of another measurement procedure $\tilde{M}$
with measurement events $\\{[\tilde{m}|\tilde{M}]\\}_{\tilde{m}\in
V_{\tilde{M}}}$, symbolically denoted by

$\displaystyle[m|M]\equiv\sum_{\tilde{m}}p(m|\tilde{m})[\tilde{m}|\tilde{M}],$
$\displaystyle\textrm{where }\forall
m,\tilde{m}:p(m|\tilde{m})\in\\{0,1\\},\sum_{m}p(m|\tilde{m})=1,$ (4)

then its representation in the operational description as well as in the
ontological description satisfies this coarse-graining relation.666Note that
Eq. (2.3.1) is not an operational equivalence between independent procedures.
It is a definition of a new procedure obtained by coarse-graining another
procedure. More explicitly, the coarse-graining relation of Eq. (2.3.1)
denotes the following post-processing of $\tilde{M}$: for each $m\in V_{M}$,
relabel each outcome $\tilde{m}\in V_{\tilde{M}}$ to outcome $m$ with
probability $p(m|\tilde{m})\in\\{0,1\\}$; the logical disjunction of those
$\tilde{m}$ which are relabelled to $m$ with probability $1$ then defines the
measurement event $[m|M]$. Now, in the operational theory, this post-
processing is represented by

$\displaystyle\forall[s|S],\textrm{ where }s\in V_{S},S\in\mathscr{S}:$
$\displaystyle
p(m,s|M,S)\equiv\sum_{\tilde{m}}p(m|\tilde{m})p(\tilde{m},s|\tilde{M},S),$ (5)

and in the ontological model it is represented by

$\forall\lambda\in\Lambda:\xi(m|M,\lambda)\equiv\sum_{\tilde{m}}p(m|\tilde{m})\xi(\tilde{m}|\tilde{M},\lambda).$
(6)

As an example, consider a three-outcome measurement $\tilde{M}$ with outcomes
$\tilde{m}\in\\{1,2,3\\}$, which can be classically post-processed to obtain a
two-outcome measurement $M$ with outcomes $m\in\\{0,1\\}$, such that
$p(m=0|\tilde{m}=1)=p(m=0|\tilde{m}=2)=1$ and $p(m=1|\tilde{m}=3)=1$. The
measurement events of $M$ are then just

$\displaystyle[m=0|M]$
$\displaystyle\equiv[\tilde{m}=1|\tilde{M}]+[\tilde{m}=2|\tilde{M}],$ (7)
$\displaystyle[m=1|M]$ $\displaystyle\equiv[\tilde{m}=3|\tilde{M}],$ (8)

where the “$+$” sign denotes (just as the summation sign in the definition of
$[m|M]$ in Eq. (2.3.1) did) logical disjunction, i.e., measurement event
$[m=0|M]$ is said to occur when $[\tilde{m}=1|\tilde{M}]$ or
$[\tilde{m}=2|\tilde{M}]$ occurs. The operational and ontological
representations of these measurement events are then given by

$\displaystyle\forall[s|S],\textrm{ where }s\in V_{S},S\in\mathscr{S}:$
$\displaystyle
p(m=0,s|M,S)\equiv\sum_{\tilde{m}=1}^{2}p(\tilde{m},s|\tilde{M},S),$ (9)
$\displaystyle p(m=1,s|M,S)\equiv p(\tilde{m}=3,s|\tilde{M},S),$ (10)
$\displaystyle\forall\lambda\in\Lambda:$
$\displaystyle\xi(m=0|M,\lambda)\equiv\sum_{\tilde{m}=1}^{2}\xi(\tilde{m}|\tilde{M},\lambda),$
(11)
$\displaystyle\xi(m=1|M,\lambda)\equiv\xi(\tilde{m}=3|\tilde{M},\lambda).$
(12)

This requirement on the representation of coarse-graining of measurements is
particularly important (and often implicit) when the notion of a measurement
context is instantiated by compatibility (or joint measurability), as in the
case of KS-contextuality, where one needs to consider coarse-grainings of
distinct measurements. For example, consider a measurement setting $M_{12}$
with outcomes $(m_{1},m_{2})\in V_{1}\times V_{2}$ that is coarse-grained over
$m_{2}$ to define an effective measurement setting $M_{1}^{(2)}$ with
measurement events $\\{[m_{1}|M_{1}^{(2)}]\\}_{m_{1}\in V_{1}}$. Symbolically,
$[m_{1}|M_{1}^{(2)}]\equiv\sum_{m_{2}}[(m_{1},m_{2})|M_{12}]$, which is
represented in the operational theory as
$\forall[s|S]:p(m_{1},s|M_{1}^{(2)},S)\equiv\sum_{m_{2}}p((m_{1},m_{2}),s|M_{12},S)$
and in the ontological model as
$\forall\lambda:\xi(m_{1}|M_{1}^{(2)},\lambda)\equiv\sum_{m_{2}}\xi((m_{1},m_{2})|M_{12},\lambda)$.
Similarly, consider another measurement setting $M_{13}$ with outcomes
$(m_{1},m_{3})\in V_{1}\times V_{3}$ that is coarse-grained over $m_{3}$ to
define an effective measurement setting $M_{1}^{(3)}$ with measurement events
$\\{[m_{1}|M_{1}^{(3)}]\\}_{m_{1}\in V_{1}}$. Symbolically,
$[m_{1}|M_{1}^{(3)}]\equiv\sum_{m_{3}}[(m_{1},m_{3})|M_{13}]$, which is
represented in the operational theory as
$\forall[s|S]:p(m_{1},s|M_{1}^{(3)},S)\equiv\sum_{m_{3}}p((m_{1},m_{3}),s|M_{13},S)$
and in the ontological model as
$\forall\lambda:\xi(m_{1}|M_{1}^{(3)},\lambda)\equiv\sum_{m_{3}}\xi((m_{1},m_{3})|M_{13},\lambda)$.

Now, imagine that the following operational equivalence holds at the
operational level: $[m_{1}|M_{1}^{(2)}]\simeq[m_{1}|M_{1}^{(3)}]$. KS-
noncontextuality is then the assumption that
$\sum_{m_{2}}\xi((m_{1},m_{2})|M_{12},\lambda)=\sum_{m_{3}}\xi((m_{1},m_{3})|M_{13},\lambda)$
(i.e., $\xi(m_{1}|M_{1}^{(2)},\lambda)=\xi(m_{1}|M_{1}^{(3)},\lambda)$) for
all $\lambda$ and that
$\xi((m_{1},m_{2})|M_{12},\lambda),\xi((m_{1},m_{3})|M_{13},\lambda)\in\\{0,1\\}$
for all $\lambda$. This assumption applied to multiple (compatible) subsets of
a set of carefully chosen measurements can then provide a proof of the KS
theorem, i.e., there exist sets of measurements in quantum theory such that
their operational statistics cannot be emulated by a KS-noncontextual
ontological model.

The key point here is this: the requirement that coarse-graining relations
between measurements be respected by their representations in the ontological
model is independent of the KS-(non)contextuality of the ontological
model.777In our example, this requirement has to do with the definitions of
$\xi(m_{1}|M_{1}^{(2)},\lambda)$ and $\xi(m_{1}|M_{1}^{(3)},\lambda)$, not
their ontological equivalence. The ontological equivalence only comes into
play when invoking KS-noncontextuality. However, this requirement is necessary
for the assumption of KS-noncontextuality to produce a contradiction with
quantum theory; on the other hand, a KS-contextual ontological model (while
respecting the coarse-graining relations) can always emulate quantum theory.
In this sense, the representation of coarse-grainings is baked into an
ontological model from the beginning (just as it is baked into an operational
description), before any claims about its (non)contextuality.888One could, of
course, choose to not respect the coarse-graining relations and define a
notion of an ontological model without them. In such a model, one could treat
every measurement obtained by coarse-graining another (parent) measurement as
a fundamentally new measurement with response functions not respecting the
coarse-graining relations with the parent measurement’s response functions,
even if such coarse-graining relations are respected in the operational
description. Such an ontological model, however, will not be able to
articulate the ingredients needed for a proof of the KS theorem and we will
not consider it here. Indeed, in the absence of the requirement that coarse-
graining relations be respected in an ontological model, one can easily
construct an ontological model that is “KS-noncontextual” for any operational
theory. The interested reader may look at Appendix B for more details, perhaps
after looking at Section 2.5 for the relevant definitions of noncontextuality.

####  2.3.2 Coarse-graining of preparations

Let us now consider the representation of coarse-grainings for preparation
procedures. This works in a way similar to the case of measurement procedures
which we have already outlined. If an ensemble of source events
$\\{[s|S]\\}_{s\in V_{S}}$ is defined as a coarse-graining of another
ensemble, $\\{[\tilde{s}|\tilde{S}]\\}_{\tilde{s}\in V_{\tilde{S}}}$,
symbolically denoted as

$\displaystyle[s|S]\equiv\sum_{\tilde{s}}p(s|\tilde{s})[\tilde{s}|\tilde{S}],\textrm{where
}$ $\displaystyle\forall
s,\tilde{s}:p(s|\tilde{s})\in\\{0,1\\},\sum_{s}p(s|\tilde{s})=1,$ (13)

then its representation should satisfy the same coarse-graining relation in
any description, operational or ontological. More explicitly, this coarse-
graining denotes the following post-processing: for any $s\in V_{S}$, relabel
each outcome $\tilde{s}\in V_{\tilde{S}}$ to outcome $s$ with probability
$p(s|\tilde{s})\in\\{0,1\\}$; the logical disjunction of those $\tilde{s}$
which are relabelled to $s$ with probability 1 then defines the source event
$[s|S]$. Now, in the operational theory, this coarse-graining is represented
by

$\displaystyle\forall[m|M],\textrm{ where }m\in V_{M},M\in\mathscr{M}:$
$\displaystyle
p(m,s|M,S)\equiv\sum_{\tilde{s}}p(s|\tilde{s})p(m,\tilde{s}|M,\tilde{S}),$
(14)

and in the ontological model it is represented by

$\forall\lambda\in\Lambda:\mu(\lambda,s|S)\equiv\sum_{\tilde{s}}p(s|\tilde{s})\mu(\lambda,\tilde{s}|\tilde{S}).$
(15)

In this paper, we will focus on a specific type of coarse-graining: namely,
completely coarse-graining over the outcomes of a source setting, say
$\\{[\tilde{s}|\tilde{S}]\\}_{\tilde{s}\in V_{\tilde{S}}}$, to yield an
effective one-outcome source-setting, denoted $\tilde{S}_{\top}$, associated
with a single source event $\\{[\top|\tilde{S}_{\top}]\\}$, where
$[\top|\tilde{S}_{\top}]\equiv\sum_{\tilde{s}}[\tilde{s}|\tilde{S}]$. In the
operational theory, this coarse-graining is represented by

$\displaystyle\forall[m|M],\textrm{ where }m\in V_{M},M\in\mathscr{M}:$
$\displaystyle
p(m,\top|M,\tilde{S}_{\top})\equiv\sum_{\tilde{s}}p(m,\tilde{s}|M,\tilde{S}),$
(16)

and in the ontological model it is represented by

$\forall\lambda\in\Lambda:\mu(\lambda,\top|\tilde{S}_{\top})\equiv\sum_{\tilde{s}}\mu(\lambda,\tilde{s}|\tilde{S}).$
(17)

Hence, we use the notation $[\top|\tilde{S}_{\top}]$ to denote the source
event that “at least one of the source outcomes in the set $V_{\tilde{S}}$
occurs for source setting $\tilde{S}$” (i.e., the logical disjunction of
$\tilde{s}\in V_{\tilde{S}}$), formally denoting the choice of $\tilde{S}$ and
the subsequent coarse-graining over $\tilde{s}$ by the “source setting”
$\tilde{S}_{\top}$ and the definite outcome of this source setting by
“$\top$”. This source event always occurs, i.e., $p(\top|\tilde{S}_{\top})=1$,
so $p(m,\top|M,\tilde{S}_{\top})=p(m|M,\tilde{S}_{\top},\top)$ and
$\mu(\lambda,\top|\tilde{S}_{\top})=\mu(\lambda|\tilde{S}_{\top},\top)$.

This notion of coarse-graining over all the outcomes of a source setting
allows us to define a notion of operational equivalence between the source
settings themselves. More precisely, two source settings $S$ and $S^{\prime}$
are said to be operationally equivalent, denoted
$[\top|S_{\top}]\simeq[\top|S^{\prime}_{\top}]$, if no measurement event can
distinguish them once all their outcomes are coarse-grained over, i.e.,

$\displaystyle\sum_{s\in V_{S}}p(m,s|M,S)=\sum_{s^{\prime}\in
V_{S^{\prime}}}p(m,s^{\prime}|M,S^{\prime})$ (18)
$\displaystyle\forall[m|M],m\in V_{M},M\in\mathscr{M}.$

In quantum theory, this would correspond to the operational equivalence
$\sum_{s}p(s|S)\rho_{[s|S]}=\sum_{s^{\prime}}p(s^{\prime}|S^{\prime})\rho_{[s^{\prime}|S^{\prime}]}$
for the density operator obtained by completely coarse-graining over two
distinct ensembles of quantum states, $\\{(p(s|S),\rho_{[s|S]})\\}_{s\in
V_{S}}$ and
$\\{(p(s^{\prime}|S^{\prime}),\rho_{[s^{\prime}|S^{\prime}]})\\}_{s^{\prime}\in
V_{S^{\prime}}}$ on some Hilbert space $\mathcal{H}$.

###  2.4 Joint measurability (or compatibility)

A given measurement procedure, $\\{[m|M]\\}_{m\in V_{M}}$ for some
$M\in\mathscr{M}$, in the operational description can be coarse-grained in
many different ways to define new effective measurement procedures. The
coarse-grained measurement procedures thus obtained from $\\{[m|M]\\}_{m\in
V_{M}}$ are then said to be jointly measurable (or compatible), i.e., they can
be jointly implemented by the same measurement procedure $\\{[m|M]\\}_{m\in
V_{M}}$ which we refer to as their parent or joint measurement. Formally, a
set $\mathcal{C}$ of measurement procedures

$\\{\\{[m_{i}|M_{i}]\\}_{m_{i}\in
V_{M_{i}}}\big{|}i\in\\{1,2,3,\dots,|\mathcal{C}|\\}\\}$

is said to be jointly measurable (or compatible) if it arises from coarse-
grainings of a single measurement procedure $M\in\mathscr{M}$, i.e., for all
$\\{[m_{i}|M_{i}]\\}_{m_{i}\in V_{M_{i}}}\in\mathcal{C}$

$[m_{i}|M_{i}]\equiv\sum_{m\in V_{M}}p(m_{i}|m)[m|M],$ (19)

where for all $i,m,m_{i}$: $p(m_{i}|m)\in\\{0,1\\}$ and $\sum_{m_{i}\in
V_{M_{i}}}p(m_{i}|m)=1$. In terms of the operational probabilities, this means
that

$\displaystyle\forall[s|S],s\in V_{S},S\in\mathscr{S}\textrm{ and
}\forall\\{[m_{i}|M_{i}]\\}_{m_{i}\in V_{M_{i}}}\in\mathcal{C}:$
$\displaystyle p(m_{i},s|M_{i},S)\equiv\sum_{m\in V_{M}}p(m_{i}|m)p(m,s|M,S).$
(20)

If, on the other hand, a set of measurement procedures cannot arise from
coarse-grainings of any single measurement procedure, then the measurement
procedures in the set are said to be incompatible, i.e., they cannot be
jointly implemented.

Note that we will also often refer to a measurement procedure
$\\{[m_{i}|M_{i}]\\}_{m_{i}\in V_{M_{i}}}$ by just its measurement setting,
$M_{i}$, and thus speak of the (in)compatibility of measurement settings.
Another notion that we will need to refer to is the joint measurability of
measurement events: a set of measurement events that arise as outcomes of a
single measurement setting are said to be jointly measurable, e.g., all the
measurement events in $\\{[m|M]\\}_{m\in V_{M}}$ are jointly measurable since
they arise as outcomes of a single measurement setting $M$.

As a quantum example, consider a commuting pair of projective measurements,
say $\\{\Pi_{1},I-\Pi_{1}\\}$ and $\\{\Pi_{2},I-\Pi_{2}\\}$, where $\Pi_{1}$
and $\Pi_{2}$ are projectors on some Hilbert space $\mathcal{H}$ such that
$\Pi_{1}\Pi_{2}=\Pi_{2}\Pi_{1}$ and $I$ is the identity operator on
$\mathcal{H}$. This pair is jointly implementable since they can be obtained
by coarse-graining the outcomes of the joint projective measurement given by
$\\{\Pi_{1}\Pi_{2},\Pi_{1}(I-\Pi_{2}),(I-\Pi_{1})\Pi_{2},(I-\Pi_{1})(I-\Pi_{2})\\}$.

###  2.5 Noncontextuality

It is always possible to build an ontological model reproducing the
predictions of any operational theory, while respecting the coarse-graining
relations.999Note that we will always assume coarse-graining relations are
respected in any ontological model. The exception is (some of) the discussion
in Section 2.3 and Appendix B where we consider the alternative possibility. A
trivial example of such an ontological model is one where ontic states
$\lambda$ are identified with the preparation procedures $P_{[s|S]}$ (where
$s\in V_{S}$ and $S\in\mathscr{S}$) and we have
$\mu(\lambda,s|S)\equiv\delta_{\lambda,\lambda_{[s|S]}}p(s|S)$, where ontic
state $\lambda_{[s|S]}$ is the one deterministically sampled by the
preparation procedure $P_{[s|S]}$. Further, the response functions are
identified with operational probabilities as $\xi(m|M,\lambda_{[s|S]})\equiv
p(m|M,S,s)$. Then we have
$\sum_{\lambda\in\Lambda}\xi(m|M,\lambda)\mu(\lambda,s|S)=\xi(m|M,\lambda_{[s|S]})p(s|S)=p(m,s|M,S)$.
Also, coarse-graining relations of the type
$[\tilde{m}|\tilde{M}]\equiv\sum_{m}p(\tilde{m}|m)[m|M]$ and
$[\tilde{s}|\tilde{S}]\equiv\sum_{s}p(\tilde{s}|s)[s|S]$ that are respected in
the operational description are also respected in this ontological
description: that is, we have
$\forall\lambda\in\Lambda:\xi(\tilde{m}|\tilde{M},\lambda)\equiv\sum_{m}p(\tilde{m}|m)\xi(m|M,\lambda)$
and
$\forall\lambda\in\Lambda:\mu(\lambda,\tilde{s}|\tilde{S})\equiv\sum_{s}p(\tilde{s}|s)\mu(\lambda,s|S)$.

Hence, it is only when additional assumptions are imposed on an ontological
model that deciding its existence becomes a nontrivial problem. Such
additional assumptions must, of course, play an explanatory role to be worth
investigating. The assumption we are interested in is noncontextuality,
applied to both preparation and measurement procedures. Motivated by the
methodological principle of the identity of indiscernables [18],
noncontextuality is an inference from the operational description to the
ontological description of an experiment. It posits that the equivalence
structure in the operational description is preserved in the ontological
description, i.e., the reason one cannot distinguish two operationally
equivalent representations of procedures based on their operational statistics
is that there is, ontologically, no difference in their representations. We
now formally define the notion of noncontextuality in its generalized form due
to Spekkens [18].

Mathematically, the assumption of measurement noncontextuality entails that

$\displaystyle[m|M]\simeq[m^{\prime}|M^{\prime}]$
$\displaystyle\Rightarrow\xi(m|M,\lambda)=\xi(m^{\prime}|M^{\prime},\lambda),\forall\lambda\in\Lambda,$
(21)

while the assumption of preparation noncontextuality entails that

$\displaystyle[s|S]\simeq[s^{\prime}|S^{\prime}]\Rightarrow\mu(\lambda,s|S)=\mu(\lambda,s^{\prime}|S^{\prime})\quad\forall\lambda\in\Lambda,$
$\displaystyle[\top|S_{\top}]\simeq[\top|S^{\prime}_{\top}]\Rightarrow\mu(\lambda|S)=\mu(\lambda|S^{\prime})\quad\forall\lambda\in\Lambda.$
(22)

Here we denote $\mu(\lambda|S)\equiv\sum_{s\in V_{S}}\mu(\lambda,s|S)$, etc.,
for simplicity of notation, rather than use the notation
$\mu(\lambda,\top|S_{\top})$, etc., for these coarse-grained probability
distributions. Note that since coarse-grainings are respected in any
ontological model we consider, we indeed have that
$\mu(\lambda,\top|S_{\top})\equiv\sum_{s\in V_{S}}\mu(\lambda,s|S)$.

These are the assumptions of noncontextuality – termed universal
noncontextuality – that form the basis of our approach to noise-robust
noncontextuality inequalities [12, 13, 14, 15, 16, 17, 45]. Note that the
traditional notion of KS-noncontextuality entails, besides measurement
noncontextuality above, the assumption of outcome-determinism, i.e., for any
measurement event $[m|M]$, $\xi(m|M,\lambda)\in\\{0,1\\}$ for all
$\lambda\in\Lambda$.

It is important to note that in order for our notion of operational
equivalence to be experimentally testable, we need that each of sets
$\mathbb{M}$ and $\mathbb{S}$ includes a tomographically complete set of
measurements and preparations, respectively. That is, the prepare-and-measure
experiment testing contextuality can probe a tomographically complete set of
preparations and measurements. Of course, the set of all possible measurements
in a theory ($\mathscr{M}$) is (by definition) tomographically complete for
any preparation in the theory and, similarly, the set of all possible
preparations ($\mathscr{S}$) in a theory is tomographically complete for any
measurement in the theory. However, there may exist smaller (finite) sets of
preparations and measurements in the theory that are tomographically complete
and in that case we require that $\mathbb{S}$ and $\mathbb{M}$ include such
tomographically complete sets, even if they don’t include all possible
preparations and measurements in the theory. For example, when the operational
theory is quantum theory for a qubit, the three spin measurements
$\\{\sigma_{x},\sigma_{y},\sigma_{z}\\}$ are tomographically complete for any
qubit preparation, so we require that $\mathbb{M}$ includes these three
measurements even if it doesn’t include every other possible measurement on a
qubit. While the requirement that $\mathbb{S}$ and $\mathbb{M}$ include
tomographically complete sets doesn’t directly reflect in our theoretical
derivation of the noise-robust noncontextuality inequalities later, it is
crucial for experimentally verifying the operational equivalences (cf. Eqs.
(1),(2.1),(18)) we need to even invoke the assumption of noncontextuality (cf.
Eqs. (2.5),(2.5)). Further, this assumption on $\mathbb{M}$ and $\mathbb{S}$
has so far been necessary to be able to implement an actual noise-robust
contextuality experiment [13], besides the requirement that the operational
theory be convex, i.e., probabilistic mixtures of procedures in the theory
(whether preparations or measurements) are also valid procedures in the
theory. We refer the reader to Refs. [13, 36, 37] for a discussion of what
tomographic completeness entails for (convex) operational theories formalized
as general probabilistic theories (GPTs). Although we will not discuss it in
this paper, see Ref. [38] for some recent work towards relaxing the
tomographic completeness requirement for the set of measurement settings.

###  2.6 An example of Spekkens contextuality: the fair coin flip inequality

We recap here an example of Spekkens contextuality that has been
experimentally demonstrated [13] to give the reader a flavour of the general
approach we are going to adopt in the rest of this paper with regard to
Kochen-Specker type scenarios. We call the inequality tested in Ref. [13] the
“fair coin flip” inequality.

Consider a prepare-and-measure scenario with three source settings, denoted
$\mathbb{S}\equiv\\{S_{1},S_{2},S_{3}\\}$, such that
$V_{S_{i}}\equiv\\{0,1\\}$ and we have $p(s_{i}=0|S_{i})=p(s_{i}=1|S_{i})=1/2$
for all $i\in\\{1,2,3\\}$. Each $S_{i}$ thus corresponds to the ensemble of
preparation procedures $\\{(p(s_{i}|S_{i}),P_{[s_{i}|S_{i}]})\\}_{s_{i}\in
V_{S_{i}}}$ and we have the following operational equivalence among the source
settings after coarse-graining:

$[\top|S_{1_{\top}}]\simeq[\top|S_{2_{\top}}]\simeq[\top|S_{3_{\top}}].$ (23)

There are four measurement settings in this scenario, denoted
$\mathbb{M}\equiv\\{M_{1},M_{2},M_{3},M_{\rm fcf}\\}$, such that
$V_{M_{i}}\in\\{0,1\\}$ for all $i\in\\{1,2,3,{\rm fcf}\\}$. The measurement
setting $M_{\rm fcf}$ is a fair coin flip, i.e., it is insensitive to the
preparation procedure preceding it and yields the outcome $m_{\rm fcf}=0$ or
$1$ with equal probability for any preparation procedure $P_{[s|S]}$, i.e.,
$p(m_{\rm fcf}=0|M_{\rm fcf},S,s)=p(m_{\rm fcf}=1|M_{\rm fcf},S,s)=1/2$ for
all $[s|S]$.

We also define a measurement procedure $M_{\rm mix}$ as a classical post-
processing of $M_{1},M_{2},M_{3}$, i.e., its measurement events $\\{[m_{\rm
mix}|M_{\rm mix}]\\}_{m_{\rm mix}=0}^{1}$ are defined by the classical post-
processing relation

$[m_{\rm mix}|M_{\rm mix}]\equiv\sum_{i=1}^{3}p(i)\sum_{m_{i}=0}^{1}p(m_{\rm
mix}|m_{i})[m_{i}|M_{i}],$ (24)

which symbolically denotes the following post-processing of measurements
$M_{1},M_{2},M_{3}$: consider a uniform probability distribution
$\left\\{p(i)=\frac{1}{3}\right\\}_{i=1}^{3}$ over the measurement settings
$\\{M_{i}\\}_{i=1}^{3}$ and relabel the respective measurement outcomes, i.e.,
$\\{m_{i}\in\\{0,1\\}\\}_{i=1}^{3}$, to a measurement outcome $m_{\rm
mix}\in\\{0,1\\}$ according to the probability distributions

$\\{\\{p(m_{\rm mix}|m_{i})=\delta_{m_{\rm mix},m_{i}}\\}_{m_{\rm
mix}\in\\{0,1\\}}\\}_{i=1}^{3};$

coarse-graining over $m_{i}$ and $i$ then yields the effective measurement
setting $M_{\rm mix}$ with outcomes labelled by $m_{\rm mix}\in\\{0,1\\}$. In
contrast to the kinds of coarse-graining (over measurement outcomes) that
appear in KS-noncontextuality (which we discussed in Section 2.3), the
(probabilistic) coarse-graining here is over the measurement settings
themselves while retaining the outcome labels.101010We did not discuss these
more general types of classical post-processing in Section 2.3 because they
are not relevant to the treatment of Kochen-Specker type scenarios in the
Spekkens framework. The example we present here is from Ref. [13], which is
not of Kochen-Specker type. The general principle underlying the
representation of such classical post-processings is, however, the same: they
should be respected in the operational as well as the ontological description.
We require that this coarse-graining relation be respected in the operational
as well as the ontological description. In the operational description, this
coarse-graining is represented by

$\displaystyle\forall[s|S],b\in\\{0,1\\}:$ $\displaystyle p(m_{\rm
mix}=b,s|M_{\rm mix},S)\equiv\frac{1}{3}\sum_{i=1}^{3}p(m_{i}=b,s|M_{i},S).$
(25)

We require the following operational equivalence between measurement events of
$M_{\rm mix}$ and $M_{\rm fcf}$ with respect to which we invoke the assumption
of measurement noncontextuality:

$\forall b\in\\{0,1\\}:[m_{\rm mix}=b|M_{\rm mix}]\simeq[m_{\rm fcf}=b|M_{\rm
fcf}]$ (26)

If we then look at an operational quantity quantifying source-measurement
correlations, namely,

${\rm Corr}_{\rm
fcf}\equiv\sum_{i=1}^{3}\frac{1}{3}\sum_{m_{i},s_{i}}\delta_{m_{i},s_{i}}p(m_{i},s_{i}|M_{i},S_{i}),$
(27)

then the assumption of preparation noncontextuality applied to operational
equivalence in Eq. (23) (so that
$\mu(\lambda|S_{1})=\mu(\lambda|S_{2})=\mu(\lambda|S_{3})$ for all
$\lambda\in\Lambda$) and the assumption of measurement noncontextuality
applied to the operational equivalence in Eq. (26) (so that
$\frac{1}{3}\xi(0|M_{1},\lambda)+\frac{1}{3}\xi(0|M_{2},\lambda)+\frac{1}{3}\xi(0|M_{3},\lambda)=\frac{1}{2}$
for all $\lambda\in\Lambda$) lead to the following constraint:

${\rm Corr}_{\rm fcf}\leq\frac{5}{6}.$ (28)

To see how this is obtained, note that

$\displaystyle\sum_{i=1}^{3}\frac{1}{3}\sum_{m_{i},s_{i}}\delta_{m_{i},s_{i}}p(m_{i},s_{i}|M_{i},S_{i})$
$\displaystyle=\sum_{i=1}^{3}\frac{1}{3}\sum_{m_{i},s_{i}}\delta_{m_{i},s_{i}}\sum_{\lambda\in\Lambda}\xi(m_{i}|M_{i},\lambda)\mu(\lambda,s_{i}|S_{i})$
$\displaystyle\leq\sum_{i=1}^{3}\frac{1}{3}\sum_{\lambda\in\Lambda}\max_{m_{i}}\xi(m_{i}|M_{i},\lambda)\sum_{m_{i},s_{i}}\delta_{m_{i},s_{i}}\mu(\lambda,s_{i}|S_{i})$
$\displaystyle=\sum_{i=1}^{3}\frac{1}{3}\sum_{\lambda\in\Lambda}\zeta(M_{i},\lambda)\sum_{s_{i}}\mu(\lambda,s_{i}|S_{i})$
$\displaystyle=\sum_{\lambda\in\Lambda}\sum_{i=1}^{3}\frac{1}{3}\zeta(M_{i},\lambda)\nu(\lambda),$
(29)

where we have that
$\zeta(M_{i},\lambda)\equiv\max_{m_{i}}\xi(m_{i}|M_{i},\lambda)$ and that
$\nu(\lambda)\equiv\mu(\lambda|S_{i})$ for all $i\in\\{1,2,3\\}$. This allows
us to put the upper bound

$\displaystyle{\rm Corr}_{\rm fcf}$
$\displaystyle\leq\max_{\lambda\in\Lambda}\frac{1}{3}\sum_{i=1}^{3}\zeta(M_{i},\lambda),$
(30)

which, subject to the constraint (from measurement noncontextuality) that
$\frac{1}{3}\xi(0|M_{1},\lambda)+\frac{1}{3}\xi(0|M_{2},\lambda)+\frac{1}{3}\xi(0|M_{3},\lambda)=\frac{1}{2}$,
yields Eq. (28).111111The reader may look at Appendix B.1 of Ref. [13] to
convince themselves that the maximum is achieved for an assignment of response
functions of the type $\xi(0|M_{1},\lambda)=1$,
$\xi(0|M_{2},\lambda)=\frac{1}{2}$ and $\xi(0|M_{1},\lambda)=0$ for some
$\lambda$. It turns out that in quantum theory the sources and measurements
required for this scenario can be realized on a qubit and they can, in
principle, achieve the value ${\rm Corr}=1$. This can be achieved by taking
the three preparations to be the trine preparations on an equatorial plane
(say, the Z-X plane) of the Bloch sphere and the measurements
$\\{M_{i}\\}_{i=1}^{3}$ to be the trine measurements, i.e.,

$\displaystyle\rho_{[s_{i}=0|S_{i}]}\equiv\frac{1}{2}(\mathbb{I}+\vec{\sigma}.\vec{n}_{i})\equiv\Pi^{0}_{i},$
$\displaystyle\rho_{[s_{i}=1|S_{i}]}\equiv\frac{1}{2}(\mathbb{I}-\vec{\sigma}.\vec{n}_{i})\equiv\Pi^{1}_{i},$
$\displaystyle E_{[m_{i}=0|M_{i}]}\equiv\Pi^{0}_{i},$ $\displaystyle
E_{[m_{i}=1|M_{i}]}\equiv\Pi^{1}_{i},$ (31)

where $\vec{n}_{1}\equiv(0,0,1)$,
$\vec{n}_{2}\equiv(\frac{\sqrt{3}}{2},0,-\frac{1}{2})$,
$\vec{n}_{3}\equiv(-\frac{\sqrt{3}}{2},0,-\frac{1}{2})$, and
$\vec{\sigma}\equiv(\sigma_{x},\sigma_{y},\sigma_{z})$ denotes the three Pauli
matrices $\sigma_{x}=\begin{pmatrix}0&1\\\ 1&0\end{pmatrix}$,
$\sigma_{y}=\begin{pmatrix}0&-i\\\ i&0\end{pmatrix}$, and
$\sigma_{z}=\begin{pmatrix}1&0\\\ 0&-1\end{pmatrix}$. The operational
equivalences are then easy to verify:

$\displaystyle\rho_{[\top|S_{i_{\top}}]}$
$\displaystyle=\frac{\mathbb{I}}{2},\quad\forall i\in\\{1,2,3\\},$
$\displaystyle\frac{1}{3}\sum_{i=1}^{3}\Pi^{0}_{i}$
$\displaystyle=\frac{\mathbb{I}}{2}.$ (32)

The quantity ${\rm Corr}_{\rm fcf}=1$ from this quantum realization. The
experimental violation of the noise-robust noncontextuality inequality, Eq.
(28), was demonstrated in Ref. [13], where more details may be found. Note
that the fair coin flip inequality, Eq.(28), is not inspired by the kinds of
operational equivalences that are relevant in a proof of the Kochen-Specker
theorem, but employs other kinds of operational equivalences allowed in the
Spekkens framework [18], i.e., the operational equivalences in Eqs. (23) and
(26) do not arise from the same measurement outcome being shared by different
measurements.

Our goal in the present paper is to provide a framework for noise-robust
noncontextuality inequalities obtained from statistical proofs of the KS
theorem, in particular those that are covered by the CSW framework [22], so
that such inequalities can be put to an experimental test along the lines of
Ref. [13] within the Spekkens framework. Hence, the operational equivalences
between measurement events that will be of interest to us in this paper are
precisely those which allow for a proof of the KS theorem, i.e., those which
correspond to the same measurement outcome (e.g., a projector) being shared by
different measurements (e.g., projective measurements).

###  2.7 Connection to Bell scenarios

As further motivation to study the questions we are posing, note that one can
also view the general prepare-and-measure scenario we are considering in this
paper (Fig. 1) as arising on one wing of a two-party Bell experiment: that is,
given two parties – Alice and Bob – sharing an entangled state and performing
local measurements in a Bell experiment, one can view each choice of
measurement setting on Alice’s side as preparing an ensemble of states on
Bob’s side; on account of no-signalling, the reduced state on Bob’s side will
be the same regardless of Alice’s choice of measurement setting, i.e., all the
ensembles corresponding to Alice’s measurement settings (hence, Bob’s source
settings) will be operationally equivalent.

For example, consider a Bell experiment where Alice has two choices of
measurement settings, $M^{A}_{x}\equiv\sigma_{x}$ or
$M^{A}_{z}\equiv\sigma_{z}$, and she shares a Bell state with Bob:
$|\psi\rangle=\frac{1}{\sqrt{2}}\left(|00\rangle+|11\rangle\right)$. Bob has
access to some set of measurement settings
$\mathbb{M}^{B}\equiv\\{M^{B}_{j}\\}_{j}$ on his system. When Alice measures
$M^{A}_{x}$, she prepares the ensemble of states
$S^{A}_{x}\equiv\\{(1/2,\rho_{[s^{A}_{x}=0|S^{A}_{x}]}\equiv|+\rangle\langle+|),(1/2,\rho_{[s^{A}_{x}=1|S^{A}_{x}]}\equiv|-\rangle\langle-|)\\}$
on Bob’s side and when she measures $M^{A}_{z}$ she prepares the ensemble of
states
$S^{A}_{z}\equiv\\{(1/2,\rho_{[s^{A}_{z}=0|S^{A}_{z}]}\equiv|0\rangle\langle
0|),(1/2,\rho_{[s^{A}_{z}=1|S^{A}_{z}]}\equiv|1\rangle\langle 1|)\\}$. These
ensembles are operationally equivalent, yielding the maximally mixed state on
coarse-graining, i.e.,

$\frac{1}{2}|0\rangle\langle 0|+\frac{1}{2}|1\rangle\langle
1|=\frac{1}{2}|+\rangle\langle+|+\frac{1}{2}|-\rangle\langle-|=\frac{\mathbb{I}}{2}.$
(33)

The quantity of interest in a Bell experiment
$p(m^{A}_{i},m^{B}_{j}|M^{A}_{i},M^{B}_{j})$ ($i\in\\{x,z\\}$) is then
formally the same as the quantity $p(s^{A}_{i},m^{B}_{j}|S^{A}_{i},M^{B}_{j})$
that we are interested in our prepare-and-measure scenario. In the ontological
model describing the effective prepare-and-measure experiment on Bob’s system,
we have the following:

$\displaystyle p(s^{A}_{i},m^{B}_{j}|S^{A}_{i},M^{B}_{j})$
$\displaystyle=\sum_{\lambda}{\rm Pr}(m^{B}_{j}|M^{B}_{j},\lambda){\rm
Pr}(\lambda,s^{A}_{i}|S^{A}_{i})$ $\displaystyle=\sum_{\lambda}{\rm
Pr}(m^{B}_{j}|M^{B}_{j},\lambda){\rm Pr}(s^{A}_{i}|S^{A}_{i},\lambda){\rm
Pr}(\lambda|S^{A}_{i}).$ (34)

Assuming preparation noncontextuality relative to the operational equivalence
$[\top|S^{A}_{x}]\simeq[\top|S^{A}_{z}]$, we have ${\rm
Pr}(\lambda|S^{A}_{x})={\rm Pr}(\lambda|S^{A}_{z})\equiv{\rm Pr}(\lambda)$, so
that

$\displaystyle p(s^{A}_{i},m^{B}_{j}|S^{A}_{i},M^{B}_{j})$
$\displaystyle=\sum_{\lambda}{\rm Pr}(s^{A}_{i}|S^{A}_{i},\lambda){\rm
Pr}(m^{B}_{j}|M^{B}_{j},\lambda){\rm Pr}(\lambda),$ (35)

which formally resembles the expression for local causality when applied to
the corresponding two-party Bell experiment:

$\displaystyle p(m^{A}_{i},m^{B}_{j}|M^{A}_{i},M^{B}_{j})$
$\displaystyle=\sum_{\lambda}{\rm Pr}(m^{A}_{i}|M^{A}_{i},\lambda){\rm
Pr}(m^{B}_{j}|M^{B}_{j},\lambda){\rm Pr}(\lambda).$ (36)

If no other assumption of noncontextuality is invoked besides the one applied
to the operational equivalence of source settings on Bob’s system, then the
constraints on $p(s^{A}_{i},m^{B}_{j}|S^{A}_{i},M^{B}_{j})$ will be the same
as the constraints on $p(m^{A}_{i},m^{B}_{j}|M^{A}_{i},M^{B}_{j})$ from Bell
inequalities.

Note, however, that the response functions ${\rm
Pr}(m^{B}_{j}|M^{B}_{j},\lambda)$ and ${\rm Pr}(m^{A}_{j}|M^{A}_{j},\lambda)$
can be completely arbitrary in a locally causal ontological model for the Bell
experiment and the same applies to the distributions ${\rm
Pr}(s^{A}_{i}|S^{A}_{i},\lambda)$ and ${\rm Pr}(m^{B}_{j}|M^{B}_{j},\lambda)$
in a preparation noncontextual model of the corresponding prepare-and-measure
scenario on Bob’s side. We will be interested in imposing additional
constraints on the response functions ${\rm Pr}(m^{B}_{j}|M^{B}_{j},\lambda)$
of the prepare-and-measure scenario (on Bob’s side) that follow from the
assumption of measurement noncontextuality applied to operational equivalences
between measurement events on Bob’s side. In particular, we are interested in
those operational equivalences between measurement events that are required by
any statistical proof of the Kochen-Specker theorem [47, 16]. We develop this
approach more carefully in the following sections.

##  3 Hypergraph approach to Kochen-Specker scenarios in the Spekkens
framework

Having set up the framework needed to articulate the relevant notions in
Section 2, we now proceed to consider Kochen-Specker type experimental
scenarios in this framework. To do this, we will use the language of
hypergraphs and their subgraphs to represent the operational equivalences
between measurement events that are required in a Kochen-Specker argument as
well as the operational equivalences between source settings that we will
invoke in our generalization. The (hyper)graph-theoretic ingredients of our
approach will represent those aspects of the general framework of Section 2
that are necessary to go from the CSW framework for KS-contextuality to a
hypergraph framework for Spekkens contextuality applied to Kochen-Specker type
experimental scenarios.

Our presentation will be a hybrid one, discussing features of the CSW
framework [21, 22] in the notation of the AFLS framework [23], but extending
both in ways appropriate for the purpose of this paper. Our goal is to
demonstrate how the graph-theoretic invariants of CSW [22] can be repurposed
towards obtaining noise-robust noncontextuality inequalities.

We do this in two parts: first, we define a representation of measurement
events in the manner of Refs. [22, 23], and then we define a representation of
source events in the spirit of Ref. [12].

###  3.1 Measurements

The basic object for representing measurements is a hypergraph, $\Gamma$, with
a finite set of vertices $V(\Gamma)$ such that each vertex $v\in V(\Gamma)$
denotes a measurement outcome, and a set of hyperedges $E(\Gamma)$ such that
each hyperedge $e\in E(\Gamma)$ is a subset of $V(\Gamma)$ and denotes a
measurement consisting of outcomes in $e$. Here, $E(\Gamma)\subseteq
2^{V(\Gamma)}$ and $\bigcup_{e\in E(\Gamma)}e=V(\Gamma)$. Such a hypergraph
satisfies the definition of a contextuality scenario à la AFLS [23]. We will
further assume, unless specified otherwise, that the hypergraph is simple:
that is, for all $e_{1},e_{2}\in E(\Gamma)$, $e_{1}\subseteq e_{2}\Rightarrow
e_{1}=e_{2}$, or that no hyperedge is a strict subset of another. Such
hypergraphs are also called Sperner families [46]. Two measurement events are
said to be (mutually) exclusive if the vertices denoting them appear in a
common hyperedge, i.e., if they can be realized as outcomes of a single
measurement setting.

The structure of a contextuality scenario $\Gamma$ represents the operational
equivalences between measurement events that are of interest in a Kochen-
Specker argument. We emphasize here that we take the operational theory to be
fundamental and the contextuality scenario for a particular Kochen-Specker
argument to be derived from (and as a graphical representation of) the
operational equivalences in the operational theory (cf. Section 2). In
particular, depending on the operational equivalences that an operational
theory can exhibit (by virtue of (in)compatibility relations between
measurements), it may or may not allow some contextuality scenario to be
realized by measurement events in the theory. The fact that a given vertex,
say $v\in V(\Gamma)$, appears in multiple hyperedges, say
$E^{\prime}\equiv\\{e\in E(\Gamma)|v\in e\\}$, means that the measurement
events corresponding to this vertex, i.e., $\\{[v|e]\\}_{e\in E^{\prime}}$,
are operationally equivalent, and the equivalence class of these measurement
events is denoted by the vertex $v$ itself. In the case of quantum theory, for
example, $v$ can represent a positive operator that appears in different
positive operator-valued measures (POVMs) represented by the hyperedges.

A probabilistic model on $\Gamma$ is an assignment of probabilities to the
vertices $v\in V(\Gamma)$ such that $p(v)\geq 0$ for all $v\in V(\Gamma)$ and
$\sum_{v\in e}p(v)=1$ for all $e\in E(\Gamma)$. As we have noted, every vertex
$v$ represents an equivalence class of measurement events, denoted
$[\mathcal{m}|\mathcal{M}]$, and every hyperedge $e$ represents an equivalence
class of measurement procedures, denoted $\mathcal{M}$.121212Note that two
measurement procedures with measurement settings $M$ and $M^{\prime}$ are
operationally equivalent if every measurement event of one is operationally
equivalent to a distinct measurement event of the other. That is, there is a
bijective correspondence (of operational equivalence) between the two sets of
measurement events. In quantum theory, for example, a given POVM (which is
what a hyperedge would represent), say $\\{E_{k}\\}_{k}$, can be implemented
in many possible ways, each such measurement procedure corresponding to
different quantum instrument. Mathematically, these different procedures can
be represented by different sets of operators $\\{O_{k}\\}_{k}$ such that
$E_{k}=O_{k}^{\dagger}O_{k}$ for all $k$ and
$\sum_{k}O_{k}^{\dagger}O_{k}=\mathbb{I}$. The fact that each $v$ represents
an equivalence class of measurement events means that

  1. 1.

any probabilistic model $p$ on $\Gamma$, realized by operational probabilities
for a given source event – that is, where for all $v\in V(\Gamma)$ and a given
$[s|S]$, $p(v)\equiv p(v|S,s)\equiv p(\mathcal{m}|\mathcal{M},S,s)$ – is
consistent with the operational equivalences represented by $\Gamma$, and

  2. 2.

any probabilistic model on $\Gamma$, realized by ontological probabilities for
a given ontic state – that is, where for all $v\in V(\Gamma)$ and a given
ontic state $\lambda$, $p(v)\equiv
p(v|\lambda)\equiv\xi(\mathcal{m}|\mathcal{M},\lambda)$ – respects (by
definition) the assumption of measurement noncontextuality with respect to the
presumed operational equivalences between measurement events.

We will therefore often write $p(\mathcal{m},s|\mathcal{M},S)$ as $p(v,s|S)$
and $p(\mathcal{m}|\mathcal{M},S,s)$ as $p(v|S,s)$, where $[s|S]$ is a source
event. Similarly, we will also write $\xi(\mathcal{m}|\mathcal{M},\lambda)$ as
$p(v|\lambda)$, where $\lambda$ is an ontic state.

Orthogonality graph of $\Gamma$, $O(\Gamma)$: Given the hypergraph $\Gamma$,
we construct its orthogonality graph $O(\Gamma)$: that is, the vertices of
$O(\Gamma)$ are given by $V(O(\Gamma))\equiv V(\Gamma)$, and the edges of
$O(\Gamma)$ are given by
$E(O(\Gamma))\equiv\\{\\{v,v^{\prime}\\}|v,v^{\prime}\in e\textrm{ for some
}e\in E(\Gamma)\\}$. Each edge of $O(\Gamma)$ denotes the exclusivity of the
two measurement events it connects, i.e., the fact that they can occur as
outcomes of a single measurement.

For any Bell-KS inequality constraining correlations between measurement
events from $O(\Gamma)$ (when all measurements are implemented on a given
source event), we construct a subgraph $G$ of $O(\Gamma)$ such that the
vertices of $G$, i.e., $V(G)$, correspond to measurement events that appear in
the inequality with nonzero coefficients, and two vertices share an edge in
$G$ if and only if they share an edge in $O(\Gamma)$. More explicitly,
consider a Bell-KS expression

$R([s|S])\equiv\sum_{v\in V(G)}w_{v}p(v|S,s),$ (37)

where $w_{v}>0$ for all $v\in V(G)$. A Bell-KS inequality imposes a constraint
of the form $R([s|S])\leq R_{\rm KS}$, where $R_{\rm KS}$ is the upper bound
on the expression in any operational theory that admits a KS-noncontextual
ontological model. Often, but not always, these inequalities are simply of the
form where $w_{v}=1$ for all $v\in V(G)$. In keeping with the CSW notation
[22], we will denote the general situation by a weighted graph $(G,w)$, where
$w$ is a function that maps vertices $v\in V(G)$ to weights $w_{v}>0$. See
Figures 2 and 3 for an example from the Klyachko-Can-Binicioğlu-Shumovsky
(KCBS) scenario [47, 22].

Figure 2: The KCBS scenario with 4-outcome joint measurements, visualized as a
hypergraph $\Gamma$ [47, 22, 16]. Figure 3: A subgraph of KCBS hypergraph
$\Gamma$, representing orthogonality relations of the events of interest in
the KCBS inequality [47, 22].

Below, we make some remarks clarifying the scope of the framework described
above before we move to the case of sources.

####  3.1.1 Classification of probabilistic models

We classify the probabilistic models on a hypergraph $\Gamma$ as follows:

  * •

KS-noncontextual probabilistic models, $\mathcal{C}(\Gamma)$: a probabilistic
model which is a convex combination of deterministic assignments
$p:V(\Gamma)\rightarrow\\{0,1\\}$, where $\sum_{v\in e}p(v)=1$ for all $e\in
E(\Gamma)$. In Ref. [23], this is referred to as a “classical model”.131313We
use a different term because we are advocating a revision of the notion of
classicality from KS-noncontextuality to generalized noncontextuality à la
Spekkens.

Note that we call $\Gamma$ KS-colourable if
$\mathcal{C}(\Gamma)\neq\varnothing$ and we call it KS-uncolourable if
$\mathcal{C}(\Gamma)=\varnothing$. Our terminology here is inspired by the
traditional usage of the term “Kochen-Specker colouring” to refer to an
assignment of two colours to vectors satisfying some orthogonality relations
under the colouring constraints of the KS theorem [48].

  * •

Consistent exclusivity satisfying probabilistic models,
$\mathcal{CE}^{1}(\Gamma)$: a probabilistic model on $\Gamma$,
$p:V(\Gamma)\rightarrow[0,1]$, such that (in addition to satisfying the
definition of a probabilistic model), $\sum_{v\in c}p(v)\leq 1$ for all
cliques $c$ in the orthogonality graph $O(\Gamma)$. This is the same as the
set of $E1$ probabilistic models of Ref. [22].

Note that a clique in the orthogonality graph $O(\Gamma)$ is a set of vertices
that are pairwise exclusive (i.e., every vertex in this set shares an edge
with every other vertex).

  * •

General probabilistic models, $\mathcal{G}(\Gamma)$: Any $p$ that satisfies
the definition of a probabilistic model is a general probabilistic model,
i.e., it can arise from measurements in some general probabilistic theory [1]
that isn’t necessarily quantum.

The set of all probabilistic models $\mathcal{G}(\Gamma)$ (for any $\Gamma$)
forms a polytope since it is defined by just the positivity and normalization
constraints on the probabilities. The extremal points (or vertices) of this
polytope fall into two categories that will interest us: deterministic and
indeterministic. The deterministic extremal points are the
$p:V(\Gamma)\rightarrow\\{0,1\\}$ such that $\sum_{v\in e}p(v)=1$ for all
$e\in E(\Gamma)$ and we denote the set of these points by
$\mathcal{G}(\Gamma)|_{\rm det}$. The indeterministic extremal points are the
$p\in\mathcal{G}(\Gamma)$ which are not deterministic and which, furthermore,
cannot be expressed as a convex mixture of other points in
$\mathcal{G}(\Gamma)$. We denote the set of indeterministic extremal points by
$\mathcal{G}(\Gamma)|_{\rm ind}$. Clearly, $\mathcal{G}(\Gamma)|_{\rm
det}\subsetneq\mathcal{C}(\Gamma)$ and $\mathcal{G}(\Gamma)|_{\rm
ind}\subseteq\mathcal{G}(\Gamma)\backslash\mathcal{C}(\Gamma)$.

Overall, we have

$\mathcal{C}(\Gamma)\subseteq\mathcal{CE}^{1}(\Gamma)\subseteq\mathcal{G}(\Gamma)$
(38)

for any hypergraph $\Gamma$.

####  3.1.2 Distinguishing two consequences of Specker’s principle: Structural
Specker’s principle vs. Statistical Specker’s principle

The CSW framework [22] restricts the scope of probabilistic models on a
hypergraph to those satisfying consistent exclusivity (the $E1$ probabilistic
models), motivated by what is sometimes called Specker’s principle [35]: that
is,

> “if you have several questions and you can answer any two of them, then you
> can also answer all of them”

If by “questions” we understand measurement settings, then the principle says
that a set of pairwise jointly implementable measurement settings is itself
jointly implementable. Note that when we say a set of measurement settings is
“jointly implementable”, “jointly measurable”, or “compatible”, we mean that
there exists another choice of a single measurement setting in the theory such
that this measurement setting can reproduce the statistics of all the
measurement settings in the set by coarse-graining.141414The reader may recall
from Section 2.4 the general definition of compatibility. Also, see Ref. [44]
for an overview of joint measurability in quantum theory. As such, in its
application to measurement settings, Specker’s principle is a constraint on
the measurements allowed in a physical theory that respects it, e.g.,
measurement settings that correspond to PVMs (projection valued measures) in
quantum theory. This is, for example, the reading adopted in Ref. [49], where
the failure of Specker’s principle in any almost quantum theory was
demonstrated. On the other hand, we will often also refer to the “joint
measurability” of a set of measurement events, by which we mean that this set
of measurement events is a subset of the set of measurement outcomes for some
choice of measurement setting. At the level of measurement events,151515Recall
that a measurement event is a measurement outcome given a choice of
measurement setting, e.g., a projector that appears in a particular PVM in
quantum theory. then, there are two distinct ways to read Specker’s principle
that one needs to keep in mind which we distinguish as structural Specker’s
principle vs. statistical Specker’s principle. We define these two readings
below:

  * •

Structural Specker’s principle imposes a structural constraint on a
contextuality scenario $\Gamma$.

This (strong) reading of Specker’s principle applies to any set of measurement
events, say $\mathfrak{M}\subseteq V(\Gamma)$, where every pair of measurement
events can arise as outcomes of a single measurement: that is, for each pair
$\\{v,v^{\prime}\\}\subseteq\mathfrak{M}$, there exists some $e\in E(\Gamma)$
such that $\\{v,v^{\prime}\\}\subseteq e$. The principle then states:

Given a set $\mathfrak{M}$ of pairwise jointly measurable measurement events
in some contextuality scenario $\Gamma$, all the measurement events in
$\mathfrak{M}$ are jointly measurable, i.e., all the measurement events in the
set can arise as outcomes of a single measurement: $\mathfrak{M}\subseteq e$
for some $e\in E(\Gamma)$.

Alternatively, the constraint of structural Specker’s principle can be
restated as:

Every clique in the orthogonality graph of $\Gamma$, $O(\Gamma)$, is a subset
of some hyperedge in $\Gamma$.

Note that we haven’t said anything directly about probabilities here: any
$\Gamma$ satisfying the above property is said to satisfy structural Specker’s
principle.

  * •

Statistical Specker’s principle (or consistent exclusivity) imposes a
statistical constraint on probabilistic models on any contextuality scenario
$\Gamma$ representing measurement events in an operational theory.

This (weak) reading of Specker’s principle imposes an additional constraint on
a probabilistic model $p\in\mathcal{G}(\Gamma)$ (thus defining
$\mathcal{CE}^{1}(\Gamma)\subseteq\mathcal{G}(\Gamma)$), namely:

Given a set $\mathfrak{M}$ of pairwise jointly measurable measurement events,
$p$ satisfies $\sum_{v\in\mathfrak{M}}p(v)\leq 1$.

This can also be expressed as:

A probabilistic model $p\in\mathcal{G}(\Gamma)$ is said to satisfy statistical
Specker’s principle if the sum of probabilities it assigns to the vertices of
every clique in the orthogonality graph of $\Gamma$, $O(\Gamma)$, does not
exceed 1, i.e., $\sum_{v\in c}p(v)\leq 1$ for all cliques $c$ in $O(\Gamma)$.

All probabilistic models that satisfy this constraint define the set of
probabilistic models $\mathcal{CE}^{1}(\Gamma)$ (or $E1$) for any
contextuality scenario $\Gamma$ regardless of whether $\Gamma$ satisfies
structural Specker’s principle. Clearly,
$\mathcal{CE}^{1}(\Gamma)\subseteq\mathcal{G}(\Gamma)$.

Any probabilistic model $p$ on $\Gamma$ such that
$p\in\mathcal{CE}^{1}(\Gamma)$ is said to satisfy statistical Specker’s
principle or, equivalently, consistent exclusivity [23].

Probabilistic models on any hypergraph $\Gamma$ which satisfies the (strong)
structural Specker’s principle obviously satisfy the (weak) statistical
Specker’s principle. This holds simply on account of the structure of such
$\Gamma$: that is, for all $\Gamma$ satisfying structural Specker’s principle,
we have $\mathcal{CE}^{1}(\Gamma)=\mathcal{G}(\Gamma)$. To see this, note that
every clique $c$ in $O(\Gamma)$ is a subset of some hyperedge in $\Gamma$,
hence for every clique $c$, $\sum_{v\in c}p(v)\leq 1$ for all
$p\in\mathcal{G}(\Gamma)$, i.e., $p\in\mathcal{CE}^{1}(\Gamma)$.161616This
partially answers the open Problem 7.2.3 of Ref. [23]. On the other hand, it
remains an open question whether the converse is true:

That is, given that $\mathcal{CE}^{1}(\Gamma)=\mathcal{G}(\Gamma)$ for some
$\Gamma$, is it the case that $\Gamma$ must then necessarily satisfy
structural Specker’s principle, namely, that every clique in $O(\Gamma)$ is a
subset of some hyperedge in $\Gamma$?

A positive answer to this question would answer Problem 7.2.3 of Ref. [23]
asking for a characterization of $\Gamma$ for which
$\mathcal{CE}^{1}(\Gamma)=\mathcal{G}(\Gamma)$.

####  3.1.3 What does it mean for an operational theory to satisfy
structural/statistical Specker’s principle?

We have so far defined structural Specker’s principle as a constraint on
$\Gamma$ and statistical Specker’s principle as a constraint on a
probabilistic model on any $\Gamma$. Any operational theory would typically
allow many possible $\Gamma$ to be realized by its measurement events as well
as many possible probabilistic models to be realized on any $\Gamma$
representing its measurement events. Note that when we say that a particular
$\Gamma$ is “realizable” or “allowed” by an operational theory, we mean that
there exist measurement events in the operational theory that satisfy the
operational equivalences required by $\Gamma$.171717Realizability of a
particular $\Gamma$ in an operational theory depends on the (in)compatibility
relations that the operational theory allows between its measurements (cf.
Section 2.4). Recall that incompatibility of measurements is necessary for KS-
contextuality to be witnessed and the structure of $\Gamma$ depends on this
incompatibility. Further, given such a $\Gamma$, the realizability of a
probabilistic model on it by the operational theory means that there exists a
source event in the operational theory that assigns probabilities to the
measurement events in $\Gamma$ according to the probabilistic model. It will
be useful for our discussion to define what it means for an operational
theory, say $\mathbb{T}$, to satisfy structural or statistical Specker’s
principle. But before we do that, let us formally specify what it means for
$\mathbb{T}$ to satisfy Specker’s principle:

$\mathbb{T}$ satisfies Specker’s principle: An operational theory $\mathbb{T}$
is said to satisfy Specker’s principle if, for any set of measurement settings
in $\mathbb{T}$ that are pairwise jointly implementable, it follows that they
are all jointly implementable in $\mathbb{T}$.181818Recall from Section 2.4
the definition of joint implementability (or joint measurability) of some set
of measurement settings.

We denote by $\mathcal{T}(\Gamma)$ the set of probabilistic models achievable
on $\Gamma$ by an operational theory $\mathbb{T}$, i.e., for any
$p\in\mathcal{T}(\Gamma)$, we have that $\forall v\in V(\Gamma):p(v)=p(v|S,s)$
for some source event $[s|S]$ possible in the operational theory
$\mathbb{T}$.191919Note that if the operational theory does not admit
measurement events (represented by vertices) exhibiting the operational
equivalences represented by $\Gamma$ (that is, $\mathbb{T}$ does not allow
$\Gamma$), then we have that $\mathcal{T}(\Gamma)$ is an empty set. Since an
operational theory can only put further constraints on probabilistic models in
$\mathcal{G}(\Gamma)$, we obviously have:
$\mathcal{T}(\Gamma)\subseteq\mathcal{G}(\Gamma)$.

  1. 1.

$\mathbb{T}$ satisfies statistical Specker’s principle: We say an operational
theory $\mathbb{T}$ satisfies statistical Specker’s principle if
$\mathcal{T}(\Gamma)\subseteq\mathcal{CE}^{1}(\Gamma)\subseteq\mathcal{G}(\Gamma)$
for all $\Gamma$.202020That is, instead of considering only a particular
probabilistic model on a particular $\Gamma$, we now consider the satisfaction
of statistical Specker’s principle by a whole set of probabilistic models,
namely, $\mathcal{T}(\Gamma)$, for all $\Gamma$.

Since the satisfaction of statistical Specker’s principle is a constraint on
the statistical predictions of $\mathbb{T}$, there must be some fact about the
structure of theory $\mathbb{T}$ that leads to this constraint. This fact
enforcing statistical Specker’s principle could be some restriction arising
from the structure of allowed measurement events and/or even the structure of
allowed preparations in the operational theory $\mathbb{T}$. For instance,
this is the case for quantum theory when one only considers projective
measurements implemented on an arbitrary quantum state, i.e.,
$\mathcal{Q}(\Gamma)\subseteq\mathcal{CE}^{1}(\Gamma)\subseteq\mathcal{G}(\Gamma)$,
where $\mathcal{Q}(\Gamma)$ denotes the set of probabilistic models that can
be obtained in this way. More generally, one could relax the no-restriction
hypothesis [3] in some particular way in $\mathbb{T}$ so that not all
probabilistic models in $\mathcal{G}(\Gamma)$ are allowed in
$\mathcal{T}(\Gamma)$. In the case of quantum theory, restricting attention to
only projective measurements (as we just pointed out) rather than the more
general case allowing arbitrary POVMs is one way of restricting the set of
possible probabilistic models realizable with quantum states and measurements
to a strict subset of $\mathcal{G}(\Gamma)$. Allowing arbitrary POVMs would
lead to a violation of statistical Specker’s principle by probabilistic models
arising from quantum theory.212121See Appendices A (specifically A.1.2) and C
for other consequences of allowing arbitrary POVMs, in particular the trivial
‘classical’ ones.

Let us now define what it means for an operational theory $\mathbb{T}$ to
satisfy structural Specker’s principle.

  2. 2.

$\mathbb{T}$ satisfies structural Specker’s principle: An operational theory
$\mathbb{T}$ is said to satisfy structural Specker’s principle if for any set
of measurement events that are pairwise jointly measurable, i.e, measurement
events in each pair arise as outcomes of some measurement in the theory, it is
the case that all the measurement events in the set are jointly measurable,
i.e., all the measurement events in the set arise as outcomes of a single
measurement in the theory.

We now show that a theory $\mathbb{T}$ that satisfies Specker’s principle also
satisfies structural Specker’s principle.

######  Theorem 1.

If an operational theory $\mathbb{T}$ satisfies Specker’s principle, then it
also satisfies structural Specker’s principle.

###### Proof.

The argument here relies on the fact that the operational theory $\mathbb{T}$
is such that measurement settings can be coarse-grained to yield new
measurement settings with fewer outcomes. Operationally, this just corresponds
to binning some subsets of outcomes together in a measurement procedure. The
operational theories we consider in this paper satisfy this property, as
outlined in Section 2.3 on coarse-graining.

The argument proceeds, for any $\Gamma$ realizable in $\mathbb{T}$, by
constructing a set of binary-outcome measurement settings for any given set of
pairwise jointly measurable vertices in $\Gamma$. These measurement settings
are, by construction, pairwise jointly measurable, so Specker’s principle
applied to them implies that they are all jointly measurable. This in turn
means that the pairwise jointly measurable vertices in the given set are also
all realizable as outcomes of a single measurement setting. Hence, the theory
$\mathbb{T}$ satisfies structural Specker’s principle. We detail the argument
below.

Consider a contextuality scenario $\Gamma$ realizable in $\mathbb{T}$. To each
vertex $v\in V(\Gamma)$, we can associate a measurement setting $M_{v}$ with
two possible outcomes labelled $\\{0,1\\}$ such that $[1|M_{v}]$ denotes the
occurrence of $v$ and $[0|M_{v}]$ denotes the non-occurrence of $v$, i.e.,
$p(v|S,s)=p(1|M_{v},S,s)$ and $1-p(v|S,s)=p(0|M_{v},S,s)$ for any
probabilistic model on $\Gamma$ induced by some source event $[s|S]$. The
measurement setting $M_{v}$ can be obtained in various (operationally
equivalent) ways from the hyperedges that $v\in V(\Gamma)$ appears in: for
each hyperedge $e\in E(\Gamma)$ such that $v\in e$, we have that the binary-
outcome measurement setting consisting of the vertices $\\{v,e\backslash v\\}$
— where $e\backslash v$ denotes a coarse-graining over all the measurement
outcomes of $e$ except $v$ — is operationally equivalent to $M_{v}$.

Now, for any pair of vertices $\\{v,v^{\prime}\\}$ that appear in a common
hyperedge of $\Gamma$, consider the two corresponding measurement settings
$\\{M_{v},M_{v^{\prime}}\\}$ such that they are jointly measurable and their
outcomes are mutually exclusive. The measurement events that can possibly
occur in their joint measurement, denoted $M_{vv^{\prime}}$, are
$[10|M_{vv^{\prime}}],[01|M_{vv^{\prime}}]$ and $[00|M_{vv^{\prime}}]$. The
probability of $[11|M_{vv^{\prime}}]$ is always zero, reflecting the fact that
$v$ and $v^{\prime}$ are mutually exclusive. Here, the coarse-graining
relations are:
$[1|M_{v}]\equiv[10|M_{vv^{\prime}}],[1|M_{v^{\prime}}]\equiv[01|M_{vv^{\prime}}],[0|M_{v}]\equiv[00|M_{vv^{\prime}}]+[01|M_{vv^{\prime}}],[0|M_{v^{\prime}}]\equiv[00|M_{vv^{\prime}}]+[10|M_{vv^{\prime}}]$.

The joint measurement $M_{vv^{\prime}}$ can be constructed from any hyperedge
that $v$ and $v^{\prime}$ appear in: for any $e\in E(\Gamma)$ such that
$\\{v,v^{\prime}\\}\subseteq e$, we have that $[10|M_{vv^{\prime}}]$ is a
measurement event corresponding to $v$,222222Recall that every vertex $v\in
V(\Gamma)$ is an equivalence class of measurement events
$[v|e]\simeq[v|e^{\prime}]$ for all $e,e^{\prime}$ such that $v\in e$ and
$v\in e^{\prime}$. $[01|M_{vv^{\prime}}]$ corresponds to $v^{\prime}$,
$[00|M_{vv^{\prime}}]$ corresponds to $e\backslash\\{v,v^{\prime}\\}$ (the
coarse-graining of all measurement outcomes in $e$ except $v$ and
$v^{\prime}$), and $[11|M_{vv^{\prime}}]$ denotes the null event
$\varnothing\subseteq e$. This means
$p(10|M_{vv^{\prime}},S,s)+p(01|M_{vv^{\prime}},S,s)+p(00|M_{vv^{\prime}},S,s)=p(v|S,s)+p(v^{\prime}|S,s)+p(e\backslash\\{v,v^{\prime}\\}|S,s)=1$
and $p(11|M_{vv^{\prime}},S,s)=0$ for any probabilistic model (induced by some
source event $[s|S]$) on $\Gamma$.

Consider now any set of vertices in $\Gamma$ that is pairwise jointly
measurable, denoted $V_{\rm 2JM}\subseteq V(\Gamma)$. We need to show that any
such set of vertices $V_{\rm 2JM}$ is jointly measurable, i.e., the theory
$\mathbb{T}$ realizing $\Gamma$ admits a single measurement such that all the
vertices in $V_{\rm 2JM}$ arise as outcomes of this measurement.

Now, the two-outcome measurement settings $\\{M_{v}|v\in V_{\rm 2JM}\\}$ we
have defined are pairwise jointly measurable and as such, following Specker’s
principle, they should all be jointly measurable in theory $\mathbb{T}$. The
joint measurement corresponding to them can be defined as

$M_{V_{\rm 2JM}}\equiv\\{[\vec{b}|M_{V_{\rm
2JM}}]\big{|}\vec{b}\in\\{0,1\\}^{V_{\rm 2JM}}\\},$ (39)

where each event $[\vec{b}|M_{V_{\rm 2JM}}]$ in the joint measurement
$M_{V_{\rm 2JM}}$ represents a particular set of outcomes for measurements in
the set $\\{M_{v}|v\in V_{\rm 2JM}\\}$.

Denoting $V_{\rm 2JM}\equiv\\{v_{1},v_{2},\dots,v_{|V_{\rm 2JM}|}\\}$, we have
that

$\displaystyle[(10\dots 0)|M_{V_{\rm 2JM}}]\equiv[1|M_{v_{1}}],$
$\displaystyle[(01\dots 0)|M_{V_{\rm 2JM}}]\equiv[1|M_{v_{2}}],$
$\displaystyle\vdots$ $\displaystyle[(00\dots 1)|M_{V_{\rm
2JM}}]\equiv[1|M_{v_{|V_{\rm 2JM}|}}],$ $\displaystyle[(00\dots 0)|M_{V_{\rm
2JM}}]$ $\displaystyle\equiv[0|M_{v_{1}}]+[0|M_{v_{2}}]+\dots+[0|M_{v_{|V_{\rm
2JM}|}}],$ (40)

where $[0|M_{v_{1}}]+[0|M_{v_{2}}]+\dots+[0|M_{v_{|V_{\rm 2JM}|}}]$ denotes
the measurement event obtained by coarse-graining the measurement events in
$\\{[0|M_{v}]|v\in|V_{\rm 2JM}|\\}$. All the other measurement events of
$M_{V_{\rm 2JM}}$ are null events that never occur, i.e., they are assigned
probability zero by every source event. Thus, using Specker’s principle
applied to the binary-outcome measurement settings defined for the vertices in
$V_{\rm 2JM}$, we have that the pairwise jointly measurable vertices in
$V_{\rm 2JM}$ are all jointly measurable, appearing as outcomes of a single
measurement $M_{V_{\rm 2JM}}$.

∎

Having established Theorem 1, we now proceed to show that a theory which
satisfies structural Specker’s principle also satisfies statistical Specker’s
principle. To do this, we consider a contextuality scenario $\Gamma$ which may
not satisfy structural Specker’s principle and from it construct a
contextuality scenario $\Gamma^{\prime}$ which does satisfy the principle. The
construction proceeds as follows:

  1. 1.

Construct $O(\Gamma)$.

  2. 2.

Turn each clique in $O(\Gamma)$ that is a hyperedge in $\Gamma$ to a hyperedge
in a new hypergraph $\Gamma^{\prime}$. That is, $\Gamma^{\prime}$ is such that
$V(\Gamma)\subseteq V(\Gamma^{\prime})$ and $E(\Gamma)\subseteq
E(\Gamma^{\prime})$.

  3. 3.

Turn each maximal clique $c$ in $O(\Gamma)$ that is not a hyperedge in
$\Gamma$ to a hyperedge in $\Gamma^{\prime}$ and include an additional vertex
$v_{c}$ in this hyperedge. Here, a maximal clique in a graph is a clique that
is not a strict subset of another clique, i.e., there is no vertex outside the
clique that shares an edge with each vertex in the clique.

We then have for the hyperedges of $\Gamma^{\prime}$,

$E(\Gamma^{\prime})=E(\Gamma)\cup\\{c\cup\\{v_{c}\\}\\}_{c\in C},$ (41)

where $C$ is the set of maximal cliques in $O(\Gamma)$ that are not hyperedges
in $\Gamma$.

Note that as long as a theory $\mathbb{T}$ satisfies structural Specker’s
principle, converting maximal cliques in $O(\Gamma)$ that are not hyperedges
in $\Gamma$ to hyperedges in $\Gamma^{\prime}$ is a valid move within the
theory since the resulting hyperedge would indeed constitute a valid
measurement in the theory.

If $C=\varnothing$ (i.e., $\Gamma$ satisfies structural Specker’s principle),
then we just have $E(\Gamma^{\prime})=E(\Gamma)$.

  4. 4.

The resulting contextuality scenario $\Gamma^{\prime}$ is thus given by:
$V(\Gamma^{\prime})=V(\Gamma)\cup\\{v_{c}\\}_{c\in C}$ and
$E(\Gamma^{\prime})=E(\Gamma)\cup\\{c\cup\\{v_{c}\\}\\}_{c\in C}$.

If $C=\varnothing$ we just have $V(\Gamma^{\prime})=V(\Gamma)$ and
$E(\Gamma^{\prime})=E(\Gamma)$ so that $\Gamma^{\prime}=\Gamma$ (i.e., the two
hypergraphs are isomorphic).

Our construction of $\Gamma^{\prime}$ leads to the following properties:

  * •

$\Gamma^{\prime}$ satisfies structural Specker’s principle (by construction)
since every clique in $O(\Gamma^{\prime})$ is a subset of some hyperedge in
$\Gamma^{\prime}$. Hence, it’s also the case that statistical Specker’s
principle holds for probabilistic models on $\Gamma^{\prime}$ as
$\mathcal{CE}^{1}(\Gamma^{\prime})=\mathcal{G}(\Gamma^{\prime})$.

Note that the construction of $\Gamma^{\prime}$ relied on the fact that the
theory we are considering satisfies structural Specker’s principle. If the
theory doesn’t satisfy this principle, but one goes ahead with the
construction of $\Gamma^{\prime}$, then the new hyperedges in
$\Gamma^{\prime}$ may not constitute valid measurements in the theory.

  * •

Probabilistic models in $\mathcal{G}(\Gamma^{\prime})$ are in bijective
correspondence with probabilistic models in $\mathcal{CE}^{1}(\Gamma)$: for
any probabilistic model $p_{\Gamma}\in\mathcal{CE}^{1}(\Gamma)$, there exists
a unique probabilistic model $p_{\Gamma^{\prime}}\equiv
f(p_{\Gamma})\in\mathcal{G}(\Gamma^{\prime})$, where the function $f$ is given
by $p_{\Gamma^{\prime}}(v)\equiv f(p_{\Gamma})(v)=p_{\Gamma}(v)$ for all $v\in
V(\Gamma)$ and $p_{\Gamma^{\prime}}(v_{c})\equiv
f(p_{\Gamma})(v_{c})=1-\sum_{v\in c}p_{\Gamma}(v)$ for all $c\in
C$.232323Recall that $\\{v_{c}\\}_{c\in C}=V(\Gamma^{\prime})\backslash
V(\Gamma)$. Similarly, for any
$p_{\Gamma^{\prime}}\in\mathcal{G}(\Gamma^{\prime})$, there exists a unique
probabilistic model $p_{\Gamma}\equiv
g(p_{\Gamma^{\prime}})\in\mathcal{CE}^{1}(\Gamma)$ given by
$p_{\Gamma}(v)\equiv g(p_{\Gamma^{\prime}})(v)=p_{\Gamma^{\prime}}(v)$ for all
$v\in V(\Gamma)$, i.e., we simply ignore the probabilities assigned to the
vertices $v_{c}\in V(\Gamma^{\prime})\backslash V(\Gamma)$ which do not appear
in $\Gamma$. Now note that the functions $f$ and $g$ are inverses of each
other: $g(f(p_{\Gamma}))=g(p_{\Gamma^{\prime}})=p_{\Gamma}$ and
$f(g(p_{\Gamma^{\prime}}))=f(p_{\Gamma})=p_{\Gamma^{\prime}}$. Hence, there is
a bijective correspondence between $\mathcal{G}(\Gamma^{\prime})$ and
$\mathcal{CE}^{1}(\Gamma)$.

  * •

Hence, the set of probabilistic models on $\Gamma$ that satisfy statistical
Specker’s principle, i.e., $\mathcal{CE}^{1}(\Gamma)$, are in one-to-one
correspondence with the set of probabilistic models on $\Gamma^{\prime}$ which
(by construction) satisfies structural Specker’s principle so that
$\mathcal{CE}^{1}(\Gamma^{\prime})=\mathcal{G}(\Gamma^{\prime})$.

We therefore have that
$\mathcal{CE}^{1}(\Gamma)=\mathcal{CE}^{1}(\Gamma^{\prime})|_{V(\Gamma)}$,
where $\mathcal{CE}^{1}(\Gamma^{\prime})|_{V(\Gamma)}$ denotes the
probabilistic models induced on $\Gamma$ by those on $\Gamma^{\prime}$
(ignoring the probabilities assigned to vertices in
$V(\Gamma^{\prime})\backslash V(\Gamma)$).

It is conceivable that a particular $\Gamma$ may not admit probabilistic
models from an operational theory $\mathbb{T}$, i.e.,
$\mathcal{T}(\Gamma)=\varnothing$. On the other hand, if $\Gamma$ admits a
representation in terms of measurement events admissible in $\mathbb{T}$, so
that $\mathcal{T}(\Gamma)\neq\varnothing$, then two possibilities arise:
$\Gamma$ satisfies structural Specker’s principle or it doesn’t. If $\Gamma$
satisfies structural Specker’s principle then any probabilistic model in
$\mathcal{T}(\Gamma)$ will satisfy statistical Specker’s principle and we have
$\Gamma^{\prime}=\Gamma$. If $\Gamma$ does not satisfy structural Specker’s
principle, we consider its relation with the contextuality scenario
$\Gamma^{\prime}$ constructed from it that does satisfy structural Specker’s
principle. Such a $\Gamma^{\prime}$ admits a representation in a theory
$\mathbb{T}$ satisfying structural Specker’s principle (that is,
$\mathcal{T}(\Gamma^{\prime})\neq\varnothing$) as long as $\Gamma$ admits such
a representation (that is, $\mathcal{T}(\Gamma)\neq\varnothing$). Indeed, it’s
the satisfaction of structural Specker’s principle in $\mathbb{T}$ that
renders the construction of $\Gamma^{\prime}$ from $\Gamma$ physically allowed
in $\mathbb{T}$.

Thus, in a theory $\mathbb{T}$ that satisfies structural Specker’s principle,
the following holds: for every probabilistic model
$p_{\Gamma}\in\mathcal{T}(\Gamma)$ $(\subseteq\mathcal{CE}^{1}(\Gamma))$,
$\Gamma^{\prime}$ admits a corresponding probabilistic model
$p_{\Gamma^{\prime}}\in\mathcal{T}(\Gamma^{\prime})$ satisfying
$p_{\Gamma^{\prime}}(v)=p_{\Gamma}(v)$ for all $v\in V(\Gamma)$ and
$p_{\Gamma^{\prime}}(v_{c})=1-\sum_{v\in c}p_{\Gamma}(v)$ for all $c\in C$,
where $C$ is the set of maximal cliques in $O(\Gamma)$ such that none of them
is a hyperedge in $\Gamma$. Similarly, given
$p_{\Gamma^{\prime}}\in\mathcal{T}(\Gamma^{\prime})$
$(\subseteq\mathcal{CE}^{1}(\Gamma^{\prime}))$,
$p_{\Gamma}\in\mathcal{T}(\Gamma)$ is uniquely fixed: it’s obtained by just
neglecting the probabilities assigned by $p_{\Gamma^{\prime}}$ to the vertices
in $V(\Gamma^{\prime})\backslash V(\Gamma)$.

We must therefore have
$\mathcal{T}(\Gamma)=\mathcal{T}(\Gamma^{\prime})\big{|}_{V(\Gamma)}$ for any
$\Gamma$, where $\mathcal{T}(\Gamma^{\prime})\big{|}_{V(\Gamma)}$ denotes the
set of probabilistic models induced on $\Gamma$ by the set of probabilistic
models in $\mathcal{T}(\Gamma^{\prime})$ under the correspondence we have
already established above. We can now state and prove the following theorem:

######  Theorem 2.

If an operational theory $\mathbb{T}$ satisfies structural Specker’s
principle, then it also satisfies statistical Specker’s principle.

###### Proof.

For any $\Gamma$ that does not admit a probabilistic model in $\mathbb{T}$,
i.e., $\mathcal{T}(\Gamma)=\varnothing$, statistical Specker’s principle is
trivially satisfied since
$\mathcal{T}(\Gamma)=\varnothing\subseteq\mathcal{CE}^{1}(\Gamma)\subseteq\mathcal{G}(\Gamma)$.

For any $\Gamma$ that does admit a probabilistic model in $\mathbb{T}$, i.e.,
$\mathcal{T}(\Gamma)\neq\varnothing$, we can have one of two possibilities:
either it satisfies structural Specker’s principle, in which case
$\mathcal{T}(\Gamma)\subseteq\mathcal{CE}^{1}(\Gamma)=\mathcal{G}(\Gamma)$, or
it doesn’t, in which case we consider the $\Gamma^{\prime}$ constructed from
it following the recipe we have already outlined so that we have:

$\mathcal{T}(\Gamma^{\prime})\big{|}_{V(\Gamma)}\subseteq\mathcal{G}(\Gamma^{\prime})\big{|}_{V(\Gamma)}=\mathcal{CE}^{1}(\Gamma^{\prime})\big{|}_{V(\Gamma)}=\mathcal{CE}^{1}(\Gamma)$.

Since $\mathbb{T}$ satisfies structural Specker’s principle, we have
$\mathcal{T}(\Gamma)=\mathcal{T}(\Gamma^{\prime})\big{|}_{V(\Gamma)}$, which
immediately implies that
$\mathcal{T}(\Gamma)\subseteq\mathcal{CE}^{1}(\Gamma)$. That is, the theory
$\mathbb{T}$ satisfies statistical Specker’s principle on $\Gamma$:
$\mathcal{T}(\Gamma)\subseteq\mathcal{CE}^{1}(\Gamma)\subseteq\mathcal{G}(\Gamma)$.

Overall, we have the desired result: $\mathbb{T}$ satisfies structural
Specker’s principle $\Rightarrow$
$\mathcal{T}(\Gamma)\subseteq\mathcal{CE}^{1}(\Gamma)\subseteq\mathcal{G}(\Gamma)$
for all $\Gamma$, i.e., $\mathbb{T}$ satisfies statistical Specker’s
principle. ∎

Thus, one way of enforcing that a particular operational theory $\mathbb{T}$
satisfies statistical Specker’s principle — that is,
$\mathcal{T}(\Gamma)\subseteq\mathcal{CE}^{1}(\Gamma)\subseteq\mathcal{G}(\Gamma)$
for all $\Gamma$ — is to require that it satisfies structural Specker’s
principle, a constraint on the structure of measurement events in
$\mathbb{T}$. This is, for example, what is achieved in Ref. [30] by invoking
a notion of “sharpness” for measurement events in an operational theory such
that any set of sharp measurement events that are pairwise jointly measurable
are all jointly measurable. That is, structural Specker’s principle is
satisfied in a theory with such sharp measurement events and, consequently,
statistical Specker’s principle, or what is more conventionally called
consistent exclusivity [23], is also satisfied. But it’s conceivable that
there may be other ways to ensure that only a subset of
$\mathcal{CE}^{1}(\Gamma)$ probabilistic models are allowed in
$\mathcal{T}(\Gamma)$ for any $\Gamma$. What we wish to emphasize here is that
it is by no means obvious (or at least, it needs to be proven) that the only
way to restrict the set of probabilistic models $\mathcal{T}(\Gamma)$ to a
subset of $\mathcal{CE}^{1}(\Gamma)$ for any $\Gamma$ is to require that the
theory $\mathbb{T}$ satisfy structural Specker’s principle.242424Indeed, any
putative theory yielding the set of almost quantum correlations (which satisfy
statistical Specker’s principle) [50] cannot satisfy Specker’s principle —
that pairwise joint implementable measurement settings are all jointly
implementable — for any notion of sharp measurements [49]. Whether structural
Specker’s principle, which is defined at the level of measurement events, can
be upheld for an almost quantum theory — so that it falls in the category of
operational theories with sharp measurements envisaged in Ref. [30] — remains
an open question.

######  Corollary 1.

For any operational theory $\mathbb{T}$, the following implications hold:

$\displaystyle\mathbb{T}\textrm{ satisfies Specker's principle}$
$\displaystyle\Rightarrow$ $\displaystyle\mathbb{T}\textrm{ satisfies
structural Specker's principle}$ (42) $\displaystyle\Rightarrow$
$\displaystyle\mathbb{T}\textrm{ satisfies statistical Specker's principle,}$
$\displaystyle\textrm{i.e., consistent exclusivity}.$ (43)

###### Proof.

This follows from combining Theorems 1 and 2. ∎

Note that statistical Specker’s principle (or consistent exclusivity) is so
intrinsic to the CSW approach [22] that they do not consider probabilistic
models that do not satisfy this principle.252525As we have already noted, a
noise-robust noncontextuality inequality of the type in Ref. [12] that is
based on a logical proof of the KS theorem is not even obtainable if one
restricted attention to probabilistic models satisfying ${\rm CE}^{1}$. The
upper bound on that inequality comes from a probabilistic model that does not
satisfy ${\rm CE}^{1}$. This will become important when we consider the fact
that nonprojective measurements in quantum theory do not satisfy Specker’s
principle, structural or statistical (at the level of measurement events), and
thus also fail to satisfy the stronger statement of Specker’s principle for
measurement settings (cf. Ref. [49]). Indeed, such measurements admit
contextuality scenarios $\Gamma$ that are not possible with projective
measurements, such as the one from three binary-outcome POVMs that are
pairwise jointly measurable but not triplewise so [39, 40, 41], and the
probabilistic models they give rise to can only be accommodated in the most
general set of probabilistic models, $\mathcal{G}(\Gamma)$, since trivial
POVMs can realize any probabilistic model. Specker’s principle, structural
Specker’s principle, and statistical Specker’s principle were all motivated by
the fact that projective measurements in quantum theory satisfy them. In
particular, consistent exclusivity (or statistical Specker’s principle) would
be obeyed in any theory where measurement events satisfy structural Specker’s
principle, and indeed, the more recent approach [29] is to restrict attention
to “sharp” measurements in such theories [30, 31], where the definition of
“sharp” ensures the property of pairwise jointly measurable events being
globally jointly measurable. This property forms the motivational basis (and
is sufficient) for statistical Specker’s principle to hold (cf. Theorem 2).
That is, this approach [30, 29] regards statistical Specker’s principle as
grounded in (and physically justified by) structural Specker’s principle.
Theorem 2 is a precise statement of this intuition in the hypergraph formalism
à la AFLS [23]. The work of Refs. [30, 31] can be understood as bridging the
gap between structural Specker’s principle and statistical Specker’s principle
by formally defining a notion of sharp measurements in an operational theory
such that structural Specker’s principle holds for these sharp measurements.

On the other hand, and this is the key point for our purposes, if one wants to
make no commitment about the representation of measurements in the operational
theory (in particular, not requiring a notion of “sharpness”), then Specker’s
principle is not a natural constraint to impose on probabilistic models and,
indeed, one must deal with the full set of probabilistic models
$\mathcal{G}(\Gamma)$ on any contextuality scenario $\Gamma$ rather than
restrict oneself to the set of probabilistic models
$\mathcal{CE}^{1}(\Gamma)$. It is for this reason that we are translating the
notions from CSW [22] to the notational conventions of AFLS [23], the latter
being a more natural choice for our purposes, allowing the language needed to
articulate the difference between $\mathcal{CE}^{1}(\Gamma)$ and
$\mathcal{G}(\Gamma)$ rather than excluding the latter by fiat or, perhaps, by
an appeal to structural Specker’s principle holding for sharp measurements in
the landscape of operational theories under consideration (cf. Theorem 2). It
is for all these reasons that the “exclusivity principle” à la CSW [22] is not
enough to make sense of Spekkens contextuality applied to Kochen-Specker type
scenarios. The framework we propose in this paper addresses this gap between
the notions Spekkens contextuality (which applies to arbitrary measurements)
requires in a hypergraph framework and those that the CSW framework [22]
(which applies to “sharp” measurements) can provide in its graph-theoretic
formulation.

####  3.1.4 Remark on the classification of probabilistic models: why we
haven’t defined “quantum models” as those obtained from projective
measurements

The reader may note that we haven’t tried to define any notion of a “quantum
model” so far, having only adopted the definitions of Ref. [23] for KS-
noncontextual models ($\mathcal{C}(\Gamma)$), for models satisfying consistent
exclusivity ($\mathcal{CE}^{1}(\Gamma)$), and for general probabilistic models
($\mathcal{G}(\Gamma)$). The reason for this is that we do not wish to
restrict ourselves to projective measurements in defining a “quantum model”,
unlike the traditional Kochen-Specker approaches [22, 23]. In Ref. [23], a
quantum model is defined as a probabilistic model that can be realized in the
following manner: assign projectors $\\{\Pi_{v}\\}_{v\in V(\Gamma)}$ (defined
on any Hilbert space) to all the vertices of $\Gamma$ such that $\sum_{v\in
e}\Pi_{v}=\mathbb{I}$ for all $e\in E(\Gamma)$, and we have
$p(v)=\text{Tr}(\rho\Pi_{v})$, for some density operator $\rho$ on the Hilbert
space, $\mathbb{I}$ being the identity operator.

On the other hand, allowing arbitrary positive operator-valued measures
(POVMs) in a definition of a quantum model (as we would rather prefer) means
that, in fact, quantum models on a hypergraph $\Gamma$ are as general as the
general probabilistic models $\mathcal{G}(\Gamma)$, rendering such a
definition redundant. This can be seen by noting that for any probabilistic
model $p\in\mathcal{G}(\Gamma)$, one can associate positive operators to the
vertices of $\Gamma$ given by $p(v)\mathbb{I}$ such that for any quantum state
$\rho$ on some Hilbert space, we have $p(v)=\text{Tr}(\rho p(v)\mathbb{I})$,
where $\mathbb{I}$ is the identity operator.

Our focus in this paper is not on quantum theory, in particular, even though
the need to be able to handle noisy measurements and preparations
(particularly, trivial POVMs) in quantum theory can be taken as a motivation
for this work. Rather, our focus is on delineating the boundary between
operational theories that admit noncontextual ontological models (for Kochen-
Specker type experiments, suitably augmented with multiple preparation
procedures, as outlined in this paper) and those that don’t by obtaining
noise-robust noncontextuality inequalities. In particular, we want these
inequalities to indicate the noise thresholds beyond which an experiment
cannot rule out the existence of a noncontextual ontological model with
respect to the quantities of interest. This also means that making sense of
quantum correlations in this approach requires one to pay attention not only
to the measurements involved in an experiment but also the preparations;
indeed, this shift of focus from measurements alone, to include multiple
preparations (or source settings), is a fundamental conceptual difference
between our approach and that of traditional Kochen-Specker contextuality
frameworks [22, 23, 25].

####  3.1.5 Scope of this framework

Note that whenever we refer to the “CSW framework”, we mean the framework of
Ref. [22], which often differs from the framework of Ref. [21] in some
respects, e.g., the normalization of probabilities in a given hyperedge,
assumed in [22], but not in [21]. In Ref. [21], the authors write:

> Notice that in all of the above we never require that any particular context
> should be associated to a complete measurement: the conditions only make
> sure that each context is a subset of outcomes of a measurement and that
> they are mutually exclusive. Thus, unlike the original KS theorem, it is
> clear that every context hypergraph $\Gamma$ has always a classical
> noncontextual model, besides possibly quantum and generalized models.

On the other hand, in Ref. [22], they write:

> The fact that the sum of probabilities of outcomes of a test is 1 can be
> used to express these correlations as a positive linear combination of
> probabilities of events, $S=\sum_{i}w_{i}P(e_{i})$, with $w_{i}>0$.

The latter presentation [22] is more in line with the “original KS theorem”
[19], as well as the presentation in Ref. [23]. Since normalization of
probabilities is thus presumed in Ref. [22], in keeping with the definition of
a probabilistic model we have presented (following [23]), the graph invariants
of CSW [22] refer, specifically, to subgraphs $G$ of those hypergraphs
$\Gamma$ on which the set of KS-noncontextual probabilistic models is non-
empty. In particular, our generalization of the CSW framework [22] in this
paper says nothing about noise-robust noncontextuality inequalities from
logical proofs of the Kochen-Specker theorem [19], which rely on hypergraphs
$\Gamma$ that admit no KS-noncontextual probabilistic models, i.e., KS-
uncolourable hypergraphs. It also says nothing for the hypergraphs $\Gamma$
that do not satisfy the property
$\mathcal{CE}^{1}(\Gamma)=\mathcal{G}(\Gamma)$. An example of such a
hypergraph, which is not covered by our generalization of the CSW framework on
both counts, is the 18 ray hypergraph first presented in Ref. [51], denoted
$\Gamma_{18}$ (see Fig. 4 and Appendix D).

Figure 4: The KS-uncolourable hypergraph from Ref. [51] that is not covered by
our generalization of the CSW framework. We denote this hypergraph as
$\Gamma_{18}$.

Indeed, the study of noise-robust noncontextuality inequalities from such KS-
uncolourable hypergraphs was initiated in Ref. [12], and a more exhaustive
hypergraph-theoretic treatment of it is presented in Ref. [34]. In this paper,
we will restrict ourselves to KS-colourable hypergraphs, the study of which
was initiated in Ref. [16], and, of these, only those KS-colourable
hypergraphs $\Gamma$ which satisfy
$\mathcal{CE}^{1}(\Gamma)=\mathcal{G}(\Gamma)$. Note that this is not a
limitation of our general approach, which is based on Ref. [16] and applies to
any KS-colourable hypergraph, but rather a limitation we inherit from the CSW
framework [22]262626Ref. [22] takes Specker’s principle to be fundamental and
identifies $\mathcal{CE}^{1}(\Gamma_{18})$ as the most general set of
probabilistic models, which is not the case for $\Gamma_{18}$ (for example).
See Appendix D for a detailed discussion of this point. since we want to
leverage their graph invariants in obtaining our noise-robust noncontextuality
inequalities. The study of other KS-colourable hypergraphs, in particular
those which arise only with nonprojective measurements in quantum theory [39,
40, 41] and are outside the scope of traditional frameworks [22, 23, 25], will
be taken up in future work.

To summarize, the measurement events hypergraphs $\Gamma$ where the present
framework (and the CSW framework [22]) applies must satisfy two properties:
$\mathcal{C}(\Gamma)\neq\varnothing$ (that is, KS-colourability) and
$\mathcal{CE}^{1}(\Gamma)=\mathcal{G}(\Gamma)$.272727As we have shown, when
the operational theory $\mathbb{T}$ under consideration satisfies structural
Specker’s principle, we can always turn a hypergraph $\Gamma$ that doesn’t
satisfy structural Specker’s principle into a hypergraph $\Gamma^{\prime}$
that satisfies it and for which, therefore,
$\mathcal{CE}^{1}(\Gamma^{\prime})=\mathcal{G}(\Gamma^{\prime})$ holds. This
can be seen as justification for restricting oneself to probabilistic models
satisfying consistent exclusivity in the CSW framework [22]: such a
restriction is not really a restriction if the theory satisfies structural
Specker’s principle. On the other hand, we restrict ourselves to hypergraphs
for which $\mathcal{CE}^{1}(\Gamma)=\mathcal{G}(\Gamma)$ without assuming that
$\mathbb{T}$ satisfies structural Specker’s principle. The justification for
this seemingly ad hoc restriction is simply that it is necessary in order to
meaningfully leverage the graph invariants of CSW [22] – in particular, the
fractional packing number – in our noise-robust noncontextuality inequalities.
This will become clear when we obtain our noise-robust noncontextuality
inequalities.

In the next subsection, we define additional notions necessary to obtain
noise-robust noncontextuality inequalities that make use of graph invariants
from the CSW framework. These notions correspond to source events that are an
integral part of our framework.

###  3.2 Sources

Having introduced the (hyper)graph-theoretic elements that we need to talk
about measurement events, we are now in a position to introduce features of
source events that are relevant in the Spekkens framework. This part of our
framework has no precedent in the literature on KS-noncontextuality, in
particular the CSW framework [22]. We introduce these source events in order
to benchmark the measurement events against them, i.e., for every measurement
event, we seek to identify in the operational theory a corresponding source
event that makes this measurement event as likely as possible. This helps us
deal with cases where a measurement device may be implementing very noisy
measurements by explicitly accounting for this noise in our noise-robust
noncontextuality inequalities. Further, while we do not assume outcome
determinism (which is essential to KS-noncontextuality), we will invoke
preparation noncontextuality with respect to these source events in the
Spekkens framework [18]. As an example of what we mean by “benchmarking” a
measurement event against a source event, consider the case of quantum theory,
where any measurement event represented by a projector occurs with probability
$1$ for any source event that is represented by an eigenstate of this
projector; on the other hand, a positive operator that isn’t projective cannot
occur with a probability greater than its largest eigenvalue ($<1$) for any
source event. We now proceed to describe the necessary hypergraph-theoretic
ingredients we need to accommodate source events in our framework.

As we have argued previously, we require the measurement events hypergraph
$\Gamma$ to be such that $\mathcal{C}(\Gamma)\neq\varnothing$ and
$\mathcal{CE}^{1}(\Gamma)=\mathcal{G}(\Gamma)$ to be able to obtain noise-
robust noncontextuality inequalities that use graph invariants from the CSW
framework [22]. Hence, we will restrict ourselves to experiments that realize
the operational equivalences represented by this class of $\Gamma$. Now, in
the CSW framework [22], every Bell-KS expression picks out a particular
subgraph $G$ of the orthogonality graph $O(\Gamma)$ of the contextuality
scenario $\Gamma$ of interest. This amounts to focussing on a restricted set
of probabilities (for the vertices of $G$) rather than probabilities for all
the measurement events (represented by vertices of $\Gamma$) in the
experiment. Hence, the vertices of $G$ denote the measurement events of
interest in a given Bell-KS expression and we have the following:

  * •

A general probabilistic model $p\in\mathcal{G}(\Gamma)$ will assign
probabilities to vertices in $G$ such that: $p(v)\geq 0$ for all $v\in V(G)$
and $p(v)+p(v^{\prime})\leq 1$ for every edge $\\{v,v^{\prime}\\}\in E(G)$.

  * •

A probabilistic model $p\in\mathcal{CE}^{1}(\Gamma)$ will assign probabilities
to vertices in $G$ such that: $p(v)\geq 0$ for all $v\in V(G)$ and

$\sum_{v\in c}p(v)\leq 1,$ (44)

for every clique $c\subseteq V(G)$.

  * •

A probabilistic model $p\in\mathcal{C}(\Gamma)$ will assign probabilities to
vertices in $G$ such that: $p(v)=\sum_{k}{\rm Pr}(k)p_{k}(v)$, where ${\rm
Pr}(k)\geq 0,\sum_{k}{\rm Pr}(k)=1$, and for each $k$, $p_{k}$ is a
deterministic assignment $p_{k}(v)\in\\{0,1\\}$ for all $v\in V(G)$, and
$p_{k}(v)+p_{k}(v^{\prime})\leq 1$ for every edge $\\{v,v^{\prime}\\}\in
E(G)$.

Since $\Gamma$ is such that $\mathcal{CE}^{1}(\Gamma)=\mathcal{G}(\Gamma)$,
the condition

$\sum_{v\in c}p(v)\leq 1\textrm{ for every clique }c\subseteq V(G)$

on the probabilities assigned to vertices in $G$ is redundant. We now obtain a
simplified hypergraph, $\Gamma_{G}$, from $G$ as follows: convert all maximal
cliques in $G$ to hyperedges and add an extra (no-detection) vertex to each
such hyperedge.282828Physically, a “no-detection” vertex denotes the case when
none of the measurement events of interest (here, the events in $G$) for a
given measurement setting occur.

This $\Gamma_{G}$, for any $G$, will satisfy the property that
$\mathcal{CE}^{1}(\Gamma_{G})=\mathcal{G}(\Gamma_{G})$ and any probabilistic
model on $\Gamma$ assigning probabilities to measurement events in $G$ will
correspond to a probabilistic model on $\Gamma_{G}$ which also assigns the
same probabilities to measurement events in $G$. Formally:
$V(\Gamma_{G})\equiv V(G)\bigsqcup\\{v_{c}|c\textrm{ is a maximal clique in
}G\\}$, and $E(\Gamma_{G})\equiv\\{c\sqcup\\{v_{c}\\}|c\textrm{ is a maximal
clique in }G\\}$, where $v_{c}$ is the extra no-detection vertex added to the
hyperedge corresponding to maximal clique $c$ in $G$.

We have the following probabilistic model on $\Gamma_{G}$, given a
probabilistic model $p\in\mathcal{G}(\Gamma)$: the probabilities assigned to
the vertices in $V(G)\subseteq V(\Gamma_{G})$ are the same as specified by
$p\in\mathcal{G}(\Gamma)$ and the probabilities assigned to the remaining
vertices in $V(\Gamma_{G})\backslash V(G)$ are given by $p(v_{c})=1-\sum_{v\in
c}p(v)$, for every maximal clique $c$ in $G$.

Figure 5: The hypergraph $\Gamma_{G}$ obtained from $G$ by adding a no-
detection vertex (represented by a hollow circle) to every maximal clique in
$G$.

Consider, for example, the KCBS scenario [47, 22, 16]: the 20-vertex $\Gamma$
representing measurement events from five 4-outcome joint measurements (Fig.
2), its 5 vertices $G$ involved in the KCBS inequality (Fig. 3), and 10-vertex
hypergraph $\Gamma_{G}$ constructed from $G$ (Fig. 5).

Given $\Gamma_{G}$, constructed from $G$, we now require that the operational
theory that realizes measurement events in $\Gamma_{G}$ also admits
preparations that can be represented by a hypergraph $\Sigma_{G}$ of source
events as follows: for every hyperedge $e\in E(\Gamma_{G})$, corresponding to
the choice of measurement setting $M_{e}$, we define a hyperedge $e\in
E(\Sigma_{G})$ denoting a corresponding choice of source setting $S_{e}$. And
for every vertex $v\in e(\in E(\Gamma_{G}))$, we define a vertex $v_{e}\in
e(\in E(\Sigma_{G}))$.292929Recall from the discussion at the beginning of
Section 3.2 that we seek to benchmark the measurement events against those
source events in the operational theory that (ideally) make them as
predictable as possible. The source setting against which the predictability
of a particular measurement setting is tested – that is the predictability of
each measurement event (e.g., $v\in e(\in E(\Gamma_{G}))$) for this
measurement setting (e.g., $M_{e}$) is benchmarked against some source event
(e.g., $v_{e}\in e(\in E(\Sigma_{G}))$) for the source setting (e.g., $S_{e}$)
– is the “corresponding choice of source setting $S_{e}$”. In Section 5.2 we
will see how these pairs of source and measurement settings are used to
compute an operational quantity relevant for our noise-robust noncontextuality
inequalities. Hence, every measurement event $[v|e]$ in $\Gamma_{G}$
corresponds to a vertex $v_{e}$ of $\Sigma_{G}$, and the number of such
vertices in $V(\Sigma_{G})$ is $|V(\Gamma_{G})||E(\Gamma_{G})|$. This means
that the operational equivalences between the measurement events that are
implicit in $\Gamma_{G}$ — such as $[v|e]$ is operationally equivalent to
$[v|e^{\prime}]$, where $e,e^{\prime}\in E(\Gamma_{G})$ are distinct
hyperedges that share the vertex (representing an equivalence class of
measurement events) $v\in V(\Gamma_{G})$ — are not carried over to the source
events, where none is presumed to be operationally equivalent to any other,
hence $v_{e}\in V(\Sigma_{G})$ is a different vertex from $v_{e^{\prime}}\in
V(\Sigma_{G})$. Here $v_{e}$ ($v_{e^{\prime}}$) represents a source event
$[s_{e}|S_{e}]$ ($[s_{e^{\prime}}|S_{e^{\prime}}]$), rather than an
equivalence class of source events.

Besides these $|V(\Gamma_{G})||E(\Gamma_{G})|$ vertices in $V(\Sigma_{G})$ and
the associated hyperedges $e\in E(\Sigma_{G})$, we require that the
operational theory admits an additional hyperedge $e_{*}\in E(\Sigma_{G})$,
representing a source setting $S_{e_{*}}$, containing two new vertices
$v^{0}_{e_{*}},v^{1}_{e_{*}}\in V(\Sigma_{G})$. Here $v^{0}_{e_{*}}$
represents the source event $[s_{e_{*}}=0|S_{e_{*}}]$ and $v^{1}_{{e_{*}}}$
represents the source event $[s_{e_{*}}=1|S_{e_{*}}]$. Hence, we have
$|V(\Sigma_{G})|=|V(\Gamma_{G})||E(\Gamma_{G})|+2$ and
$|E(\Sigma_{G})|=|E(\Gamma_{G})|+1$.

The operational equivalence we do require for $\Sigma_{G}$ (in any operational
theory that admits source events represented by $\Sigma_{G}$) applies to the
source settings: all source settings, each represented by coarse-graining the
source events in a hyperedge $e\in E(\Sigma_{G})$, are operationally
equivalent, i.e., $[\top|S_{e_{\top}}]\simeq[\top|S_{{e^{\prime}}_{\top}}]$