  Brains process information through the collective dynamics of large neural
networks. Collective chaos was suggested to underlie the complex ongoing
dynamics observed in cerebral cortical circuits and determine the impact and
processing of incoming information streams. In dissipative systems, chaotic
dynamics takes place on a subset of phase space of reduced dimensionality and
is organized by a complex tangle of stable, neutral and unstable manifolds. Key
topological invariants of this phase space structure such as attractor
dimension, and Kolmogorov-Sinai entropy so far remained elusive.
  Here we calculate the complete Lyapunov spectrum of recurrent neural
networks. We show that chaos in these networks is extensive with a
size-invariant Lyapunov spectrum and characterized by attractor dimensions much
smaller than the number of phase space dimensions. We find that near the onset
of chaos, for very intense chaos, and discrete-time dynamics, random matrix
theory provides analytical approximations to the full Lyapunov spectrum. We
show that a generalized time-reversal symmetry of the network dynamics induces
a point-symmetry of the Lyapunov spectrum reminiscent of the symplectic
structure of chaotic Hamiltonian systems. Fluctuating input reduces both the
entropy rate and the attractor dimension. For trained recurrent networks, we
find that Lyapunov spectrum analysis provides a quantification of error
propagation and stability achieved. Our methods apply to systems of arbitrary
connectivity, and we describe a comprehensive set of controls for the accuracy
and convergence of Lyapunov exponents.
  Our results open a novel avenue for characterizing the complex dynamics of
recurrent neural networks and the geometry of the corresponding chaotic
attractors. They also highlight the potential of Lyapunov spectrum analysis as
a diagnostic for machine learning applications of recurrent networks.
