We formulate a version of the integral Hodge conjecture for categories, prove two-dimensional Calabi–Yau categories which are suitably deformation equivalent to derived category K3 or abelian surface, and use this deduce cases usual varieties. Along way, we variational families as well general smoothness result relative moduli spaces objects in such families. Our machinery also has applications...