  The non-chiral edge excitations of quantum spin Hall systems and topological
insulators are described by means of their partition function. The stability of
topological phases protected by time-reversal symmetry is rediscussed in this
context and put in relation with the existence of discrete anomalies and the
lack of modular invariance of the partition function. The $\Z_2$
characterization of stable topological insulators is extended to systems with
interacting and non-Abelian edge excitations.
