  The sheaf theoretic description of non-locality and contextuality by Abramsky
and Brandenburger sets the ground for a topological study of these peculiar
features of quantum mechanics. This viewpoint has been recently developed
thanks to sheaf cohomology, which provides a sufficient condition for
contextuality of empirical models in quantum mechanics and beyond.
Subsequently, a number of studies proposed methods to detect contextuality
based on different cohomology theories. However, none of these cohomological
descriptions succeeds in giving a full invariant for contextuality applicable
to concrete examples. In the present work, we introduce a cohomology invariant
for possibilistic and strong contextuality which is applicable to the vast
majority of empirical models.
