  We study the Lyapunov spectrum of the Kontsevich--Zorich cocycle on
$SL(2,\mathbb{R})$-invariant subbundles of the Hodge bundle over the support of
a $SL(2,\mathbb{R})$-invariant probability measure on the moduli space of
Abelian differentials.
  In particular, we prove formulas for partial sums of Lyapunov exponents in
terms of the second fundamental form (or Kodaira--Spencer map) of the Hodge
bundle with respect to Gauss--Manin connection and investigate the relations
between the central {Oseldets} subbundle and the kernel of the second
fundamental form. We illustrate our conclusions in two special cases.
