\documentclass[fleqn,12pt]{wlscirep_no_abs}
\graphicspath{{.}{eps_figs/}}

\usepackage{trfsigns,amsmath}
\usepackage{xcolor} 
\usepackage{placeins}

\renewcommand{\thefigure}{S\arabic{figure}}

\usepackage{xr}
\externaldocument{trapp_EI_balance}

\newcounter{defcounter}
\setcounter{defcounter}{0}

\newenvironment{myequation}{%
\refstepcounter{defcounter}
\renewcommand\theequation{S\thedefcounter}
\begin{equation}}
{\end{equation}}

% \usepackage[urlcolor=blue]{hyperref}      % links to citations
  \hypersetup{
      colorlinks = true,                    % text and not border
      citecolor = {blue},
      linkcolor = {purple},
             }

\definecolor{darkGreen}{rgb}{0.1,0.4,0.1}
\definecolor{veryLightGrey}{rgb}{0.95,0.95,0.95}

%  fully justified figures:
\captionsetup[figure]{justification=justified, singlelinecheck=off} 
%---------------------------------
%---------------------------------
\title{E-I balance emerges naturally from continuous Hebbian learning in autonomous neural networks.}
\author[1]{Philip Trapp}
\author[2]{Rodrigo Echeveste}
\author[1]{Claudius Gros}
\affil[1]{Johann-Wolfgang-Goethe University Frankfurt, Frankfurt 60323, Germany}
\affil[2]{Computational and Biological Learning Lab, Dept. of
Engineering, University of Cambridge, Cambridge, UK}
\affil[*]{gros@itp.uni-frankfurt.de}

%\keywords{Keyword1, Keyword2, Keyword3}

%---------------------------------
\begin{document}
\flushbottom
\maketitle
\thispagestyle{empty}
%---------------------------------

\section*{Supplementary material}

\FloatBarrier

\subsection*{Impact of noise}

As it was mentioned in the section 
\textit{E-I balance in terms of E-I correlations}, 
the anti-correlation between excitatory and inhibitory 
inputs, and therefore the E-I balance, is robust 
against finite levels of noise. 
Fig.~\ref{fig:noise_correlation} shows how the 
average correlation coefficient \eqref{eq_cross_correlation} 
evolves when different levels of noise are added to 
the neuron's membrane potentials. The evolution of the 
membrane potentials with a noise term $\xi$ can be written as 
\begin{myequation}
\dot{x}_i = \frac{1}{\tau}\left(-x_{i}+x^{inp}_i + \xi \right)\,.
\label{eqn:x_with_noise}
\end{myequation}
For the simulations shown in Fig.~\ref{fig:noise_correlation} 
noise was added to a system that evolved first without noise 
for $1\text{h}$. The noise was drawn from a Gaussian with 
mean zero and standard deviation of $\sigma = 8\,, 15$ and $80$. 
These values correspond to roughly $\sim 5\,, 10$ and $50\%$ of the 
average initial exc./inh.\ input size ($\sim 160$). Small levels 
of noise, e.g. $\sigma = 5$ or $10\%$ of the initial input size, 
don't affect the correlation significantly whilst for large 
levels of noise, such as $\sigma = 50\%$ of the initial input 
size, the E-I correlation breaks down.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[t]
\centering
\includegraphics[width=0.65\linewidth]{figure_S1.eps}
\caption{For the same SOPBN as in Fig.~\ref{fig_activities_80_20}
the effect of noise on the input correlations,
Eq.~\eqref{eq_cross_correlation}, is shown. The system evolves
under the influence of added external noise (after an initial 1h evolution
without an external source of noise), as given by 
Eq.~\eqref{eqn:x_with_noise}. 
The E-I balance is robust against moderate 
noise values.
}
\label{fig:noise_correlation}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\subsection{Analysis of the irregular activity}

The activity of SOPBNs considered here is highly 
irregular (cf.\ Fig.~\ref{fig_activities_80_20}). While 
we do not intend to show here a strong proof of chaos, 
we observe in simulations where small perturbations in the membrane 
potentials were added after 1 hour of simulated biological time, how 
the resulting perturbed and unperturbed trajectories quickly diverge 
(see Fig.~\ref{fig:chaos_x_perturb}). A strict classification of chaos, 
would however require of a more extensive study, by for instance 
evaluating Lyapunov exponents.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[t]
	\centering % l u r o
    \includegraphics[width=0.65\linewidth]{figure_S2.eps}
    \caption{Six randomly selected membrane potentials 
    for an unperturbed (purple) and a slightly perturbed 80/20 
    system (green). A noise term corresponding to a Gaussian 
    with mean zero and a standard deviation of $0.1\%$ was added
    once to the membrane potential of the individual neurons  
    after the system evolved for one hour. Full decorrelation is
    achieved by $(100-200)\text{ms}$, a result indicative
    of deterministic chaos \cite{gros2015complex}.}
    \label{fig:chaos_x_perturb}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\subsection{EI-correlations in the 80/20 system}

Generalizing the result for the 50/50 system presented 
in Fig.~\ref{fig_E_I_cross_correlation}, we show
in Fig.~\ref{fig:bar_plot_80_20} an analysis of the 
input cross-correlation for initially balanced 
80/20 systems. In the tests carried out, 
intrinsic plasticity has been interestingly
necessary to sustain for the 80/20 system the
irregular activity showing up in the data
presented in Figs.~\ref{fig_activities_80_20}, 
\ref{fig_membrane_potential_3600_0} \& 
\ref{fig:chaos_x_perturb}. Hebbian plasticity alone 
without simultaneously acting intrinsic plasticity leads 
to fixpoint attractors, where the correlation coefficient 
becomes meaningless. For this reason the corresponding 
bar has been omitted in Fig.~\ref{fig:bar_plot_80_20}. 
The comparatively large correlation values observed already 
after 10 seconds after initialization, which are not present 
in the 50/50 system, can be attributed to the effects of 
intrinsic plasticity on the E-I correlation, which acts on a 
time scale of $1/\epsilon_b = 10 \text{s}$.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[t]
\centering
\includegraphics[width=0.65\linewidth]{figure_S3.eps}
\caption{E-I correlation between excitatory and inhibitory 
inputs for a $80/20$ system with $N=400$ neurons. Analogously 
to Fig.~\ref{fig_E_I_cross_correlation}, each bar represents 
the absolute value of $\rho$ from Eq.~\eqref{eq_cross_correlation} 
after 1 hour (grey), or for the 10 seconds following the
initialization (green). The data represents the average value 
for 100 simulations and the error bars the standard deviation.
For each simulation the excitatory (inhibitory) weights are 
drawn from a Gaussian with means $7.5$ ($-30.0$) and standard 
deviations $0.375$ ($1.5$), which corresponds therefore to 
initially balanced weights (as for a $80/20$ system, which
contains four times as many excitatory than inhibitory neurons). 
The different types of plasticity, which were turned on/off during 
the simulation, are depicted by green ticks and red crosses, 
respectively.}
\label{fig:bar_plot_80_20}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\clearpage
\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\bibliographystyle{plain}
\bibliography{supplementary_material}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}
\clearpage

 
}
\end{document}