  We revisit classical results of Serre, Fr\"ohlich and Saito in the theory of
quadratic forms. Given a neutral Tannakian category $(\mathcal{T},\omega)$ over
a field $k$ of characteristic $\neq 2$, another fiber functor $\eta$ over a
$k$-scheme $X$ and an orthogonal object $(M,q)$ in $\mathcal{T}$, we show
formulas relating the torsor $\bf{Isom}^{\otimes}(\omega,\eta)$ to Hasse-Witt
invariants of the quadratic space $\omega(M,q)$ and the symmetric bundle
$\eta(M,q)$. We apply this result to various neutral Tannakian categories
arising in different contexts. We first consider Nori's Tannakian category of
essentially finite bundles over an integral proper $k$-scheme $X$ with a
rational point, in order to study an analogue of the Serre-Fr\"ohlich embedding
problem for Nori's fundamental group scheme. Then we consider Fontaine's
Tannakian categories of $B$-admissible representations, in order to obtain a
generalization of both the classical Serre-Fr\"ohlich formula and Saito's
analogous result for Hodge-Tate $p$-adic representations. Finally we consider
Nori's category of mixed motives over a number field. These last two examples
yield formulas relating the torsor of periods of an orthogonal motive to
Hasse-Witt invariants of the associated Betti and de Rham quadratic forms and
to Stiefel-Withney invariants of the associated local $l$-adic orthogonal
representations. We give some computations for Artin motives and for the motive
of a smooth hypersurface.
