Predicting how and when hidden neurons skew measured synaptic interactions

A major obstacle to understanding neural coding and computation is the fact that experimental recordings typically sample only a small fraction of the neurons in a circuit. Measured neural properties are skewed by interactions between recorded neurons and the “hidden” portion of the network. To properly interpret neural data and determine how biological structure gives rise to neural circuit function, we thus need a better understanding of the relationships between measured effective neural properties and the true underlying physiological properties. Here, we focus on how the effective spatiotemporal dynamics of the synaptic interactions between neurons are reshaped by coupling to unobserved neurons. We find that the effective interactions from a pre-synaptic neuron r′ to a post-synaptic neuron r can be decomposed into a sum of the true interaction from r′ to r plus corrections from every directed path from r′ to r through unobserved neurons. Importantly, the resulting formula reveals when the hidden units have—or do not have—major effects on reshaping the interactions among observed neurons. As a particular example of interest, we derive a formula for the impact of hidden units in random networks with “strong” coupling—connection weights that scale with 1/N, where N is the network size, precisely the scaling observed in recent experiments. With this quantitative relationship between measured and true interactions, we can study how network properties shape effective interactions, which properties are relevant for neural computations, and how to manipulate effective interactions.

A major obstacle to uncovering structure-function relationships is the fact that most experiments can only directly observe small fractions of an active network.State-of-the-art methods for determining connections between neurons in living networks infer them by fitting statistical models to neural spiking data [16][17][18][19][20][21][22][23][24].However, the fact that we cannot observe all neurons in a network means that the statistically inferred connections are "effective" connections, representing some dynamical relationship between the activity of nodes but not necessarily a true physical connection [24][25][26][27][28][29][30][31][32].Intuitively, reverberations through the network must contribute to these effective interactions; our goal in this work is to formalize this intuition and establish a quantitative relationship between measured effective interactions and the true synaptic interactions between neurons.With such a relationship in hand we can study the effective interactions generated by different choices of synaptic properties and circuit architectures, allowing us to not only improve interpretation of experimental measurements but also probe how circuit structure is tied to function.
The intuitive relationship between measured and effective interactions is demonstrated schematically in Fig. 1.Fig. 1A demonstrates that in a fully-sampled network the directed interactions between neurons-here, the change in membrane potential of the post-synaptic neuron after it receives a spike from the pre-synaptic neuron-can be measured directly, as observation of the complete population means different inputs to a neuron are not conflated.However, as shown in Fig. 1B, the vastly more realistic scenario is that the recorded neurons are part of a larger network in which many neurons are unobserved or "hidden."The response of the post-synaptic neuron 2 to a spike from pre-synaptic neuron 1 is a combination of both the direct response to neuron 1's input as well as input from the hidden network driven by neuron 1's spiking.Thus, the measured membrane response of neuron 2 due to a spike fired by neuron 1-which we term the "effective interaction" from neuron 1 to 2-may be quite different from the true interaction.It is well-known that circuit connections between recorded neurons, as drawn in Fig. 1C, are at best effective circuits that encapsulate the effects of unobserved neurons, but are not necessarily indicative of the true circuit architecture.The formalized relationship we will establish in the Results is given in Fig. 2.
Even once we establish a relationship between the effective and true connections, we will in general not be able to use measurements of effective interactions to extrapolate back to a unique set of true connections; at best, we may be able to characterize some of the statistical properties of the full network.The obstacle is that several different networks-different both in terms of architecture and intrinsic neural properties-may give rise to the same network behaviors, a theme of much focus in the neuroscience literature [33][34][35][36][37][38].That is, inferring the connections and intrinsic neural properties in a full network from activity recordings from a subset of neurons is in general an ill-posed problem, possessing several degenerate solutions.Several statistical inference methods have been constructed to attempt to infer the presence of, and connections to, hidden neurons [27,[39][40][41]; the subset of the degenerate solutions that each of these methods finds will depend on the particular assumptions of the inference method (e.g., the regularization penalties applied).As an example, we demonstrate two small circuit motifs that give rise to nearly identical effective interactions, despite crucial differences between the circuits.
Understanding the effect of hidden neurons on small circuit motifs is only a small part of the hidden neuron puzzle, and a full understanding necessitates scaling up to large circuits containing many different motifs.Having an analytic relationship between true and effective interactions greatly facilitates such analyses by directly studying the structure of the relationship itself, rather than trying to extract insight indirectly through simulations.In particular, in going to large networks we focus on the degree to which hidden neurons skew measured interactions (Fig. 5), and how we can predict the features of effective interactions we expect to measure when recording from only a subset of neurons in a network with hypothesized true interactions (Fig. 6).
Establishing a theoretical relationship between measured and "true" interactions will thus enable us to study how one can alter the network properties to reshape the effective interactions, and will be of immediate importance not only for interpreting experimental measurements of synaptic interactions, but for elucidating their role in neural coding.Moreover, understanding how to shape effective interactions between neurons may yield new avenues for altering, in a principled way, the computations performed by a network, which could have applications for treating neurological diseases caused in part by pathological synaptic interactions.The hidden unit problem. A. In a hypothetical circuit consisting of just two recorded neurons (no hidden neurons), we can measure the strength and time course of the directed interactions between neurons by measuring the response of the post-synaptic neuron's membrane potential to a spike from the pre-synaptic neuron.B. Realistically, there are many more neurons in the network that are unrecorded and hence "hidden."In this schematic, only two neurons are observed.The hidden neurons are driven by input from the presynaptic neuron labeled 1, and provide input to the recorded post-synaptic neuron labeled 2. Because the activity of the hidden neurons is not controlled, the membrane response reflects a combination of neuron 1's direct influence on neuron 2 and its indirect influence through the hidden network.C. The "effective" 2 neuron network observed experimentally.

Overview
Our goal is to derive a relationship between the effective synaptic interactions between recorded neurons and the true synaptic interactions that would be obtained if the network were fully observed.This makes explicit how the synaptic interactions between neurons are modified by unobserved neurons in the network, and under what conditions these modifications are-or are not-significant.We derive this result first, using a probabilistic model of network activity in which all properties are known.We then build intuition by applying our result to two simple networks: a 3-neuron feedforward-inhibition circuit in which we are able to qualitatively reproduce measurements by Pouille and Scanziani [42], and a 4-neuron circuit that demonstrates how degeneracies in hidden networks are handled within our framework.
To extend our intuition to larger networks, we then study the effective interactions that would be observed in sparse random networks with N cells and strong synaptic weights that scale as 1/ √ N [43][44][45][46], as has been recently observed experimentally [47].We show how unobserved neurons significantly reshape the effective synaptic interactions away from the ground-truth interactions.This is not the case with "classical" synaptic scaling, in which synaptic strengths are inversely proportional to the number of inputs they receive (assumed O(N )), as we will also show.(The case of classical scaling has also been studied previously using a different approach in [48][49][50][51]).

Model
We model the full network of N neurons as a nonlinear Hawkes process [52], commonly known as a "Generalized linear (point process) model" in neuroscience, and broadly used to fit neural activity data [16][17][18][19][20][21][22][23]53].Here we use it as a generative model for network activity, as it approximates common spiking models such as leaky integrate and fire systems driven by noisy inputs [54,55], and is equivalent to current-based leaky integrate-and-fire models with soft-threshold (stochastic) spiking dynamics (see Methods).
To derive an approximate model for an observed subset of the network, we partition the network into recorded neurons (labeled by indices r) and hidden neurons (labeled by indices h).Each recorded neuron has an instantaneous firing rate λ r (t) such that the probability that the neuron fires within a small time window [t, t + dt] is λ r (t)dt, when conditioned on the inputs to the neuron.The instantaneous firing rate in our model is where λ 0 is a characteristic firing rate, φ(x) is a non-negative, continuous function, µ r is a tonic drive that sets the baseline firing rate of the neuron, and J i,j * ṅj (t) ≡ ∞ −∞ dt J i,j (t − t ) ṅj (t ) is the convolution of the synaptic interaction (or "spike filter") J i,j (t) with spike train ṅj (t) from pre-synaptic neuron j to post-synaptic neuron i.In this work we take the tonic drive to be constant in time, and focus on the steady-state network activity in response to this drive.We consider interactions of the form J i,j (t) ≡ J i,j g j (t), where the temporal waveforms g j (t) are normalized such that ∞ 0 dt g j (t) = 1 for all neurons j.Because of this normalization, the weight J i,j carries units of time.We include self-couplings J i,i (t) not to represent autapses, but to account for intrinsic neural properties such as refractory periods (J i,i < 0) or burstiness (J i,i > 0).The firing rates for the hidden neurons follow the same expression with indices h and r interchanged.
We seek to describe the dynamics of the recorded neurons entirely in terms of their own set of spiking histories, eliminating the dependence on the activity of the hidden neurons.This demands calculating the effective membrane response of the recorded neurons by averaging out the activity of the hidden neurons, conditioned on the activity of the recorded neurons.In practice this is intractable to perform exactly [56][57][58].
Here, we use a mean field approximation to calculate the mean input from the hidden neurons (again, conditioned on the activity of the recorded neurons).The value of deriving such a relationship analytically, as opposed to simply numerically determining the effective interactions, is that the resulting expression will give us insight into how the effective interactions decompose into contributions of different network features, how tuning particular features shapes the effective interactions, and conditions under which we expect hidden units to skew our measurements of connectivity in large partially observed networks.
As shown in detail in the Methods, the instantaneous firing rates of the recorded neurons can then be approximated as The effective baselines µ eff r = µ r + h J r,h ν h , are simply modulated by the net input to the neuron, so we do not focus on them here.The effective coupling filters are given in the frequency domain by Ĵeff r,r (ω) = Ĵr,r (ω) +

h,h
Ĵr,h (ω) Γh,h (ω) Ĵh ,r (ω). ( These results hold for any pair of recorded neurons r and r, and any choice of network parameters for which the mean field steady state of the hidden network exists.Here, the ν h are the steady-state mean firing rates of the hidden neurons and Γh,h (ω) is the linear response function of the hidden network to perturbations in the input.That is, Γ h,h (t − t ) is the linear response of hidden neuron h at time t due to a perturbation to the input of neuron h at time t , and incorporates the effects of h propagating its signal to h through other hidden neurons, as demonstrated graphically in Fig. 2. Both ν h and Γh,h (ω) are calculated in the absence of the recorded neurons.In deriving these results, we have neglected both fluctuations around the mean input from the hidden neurons, as well as higher order filtering of the recorded neuron spikes.For details on the derivations and justification of approximations, see the Methods and Supporting Information (SI).
The effective coupling filters are what we would-in principle-measure experimentally if we observe only a subset of a network, for example by pairwise recordings shown schematically in Fig. 1.For larger sets of recorded neurons, interactions between neurons are typically inferred using statistical methods, an extremely nontrivial task [16-23, 27, 39, 40], and details of the fitting procedure could potentially further skew the inferred interactions away from what would be measured by controlled pairwise recordings.We will put aside these complications here, and assume we have access to an inference procedure that allows us to measure J eff r,r (t) without error, so that we may focus on their properties and relationship to the ground-truth coupling filters.

Structure of effective coupling filters
The ground-truth coupling filters Ĵr,r (ω) are modified by a correction term h,h Ĵr,h (ω) Γh,h (ω) Ĵh ,r (ω).The linear response function Γh,h (ω) admits a series representation in terms of paths through the network through which neuron r is able to send a signal to neuron r via hidden neurons only.
We may write down a set of "Feynmanesque" graphical rules for explicitly calculating terms in this series [52].First, we define the gain, γ h ≡ λ 0 φ (µ h + h J h,h ν h ).The contribution of each term can then be written down using the following rules, shown graphically in Fig. 2: i ) for the edge connecting recorded neuron r to a hidden neuron h i , assign a factor Ĵhi,r (ω); ii ) for each node corresponding to a hidden neuron h i , assign a factor γ hi /(1 − γ hi Ĵhi,hi (ω)); iii ) for each edge connecting hidden neurons h i = h j , assign a factor Ĵhj,hi (ω); and iv ) for the edge connecting hidden neuron h j to recorded neuron r, assign a factor Ĵr,hj (ω).All factors for each path are multiplied together, and all paths are then summed over.
The graphical expansion is reminiscent of recent works expanding correlation functions of linear models of network spiking in terms of network "motifs" [59][60][61].Computationally, this expression is practical for calculating the effective interactions in small networks involving only a few hidden neurons (as in the next  2).The linear response of the hidden network, Γh,h (ω), has been expanded as a series (corresponding to the grey hidden nodes and links between them), such that each term in the overall series can be interpreted as a contribution from a path through which the pre-synaptic neuron r is able to send a signal to post-synaptic neuron r via 1, 2, etc. hidden neurons.This expression holds for any pair of neurons in the recorded subset.B. Quantitative expressions for each diagram in the series can be read off by assigning the shown factors for each hidden neuron node and each link between neurons, recorded or hidden, and multiplying them together.(No factor is assigned to the recorded neuron nodes).γ h is the gain of neuron h and Ĵi,j (ω) is the true interaction from j to i in the frequency domain.section), but is generally unwieldy for large networks.In practice, the linear response matrix Γh,h (ω) can be calculated directly by numerical matrix inversion and an inverse Fourier transform back into the time domain.The utility of the path-length series is the intuitive understanding of the origin of contributions to the effective coupling filters and our ability to analytically analyze the strength of contributions from each path.For example, one immediate insight the path decomposition offers is that neurons only develop effective interactions between one another if there is a path by which one neuron can send a signal to the other.

Effective interactions & emergent timescales in a small circuit
To build intuition for our result and compare to a well-known circuit phenomenon, we apply our Eq.( 2) to a 3-neuron feedforward inhibition circuit, like that studied by Pouille and Scanziani [42].Feedforward inhibition can sharpen the temporal precision of neural coding by narrowing the "window of opportunity" in which a neuron is likely to fire.For example, in the circuit shown in Fig. 3A, excitatory neuron 1 projects to both neurons 2 and 3, and 3 projects to 2. Neuron 1 drives both 2 and 3 to fire more, while neuron 3 is inhibitory and will counteract the drive neuron 2 receives from 1.The window of opportunity can be understood by looking at the effective interaction between neurons 1 and 2, treating neuron 3 as hidden.We use our path expansion (Fig. 2) to quickly write down the effective interaction we expect to measure in the frequency domain, The corresponding true synaptic interactions and resulting effective interaction are shown in Fig. 3B.The effective interaction matches qualitatively the observed membrane changes measured by Pouille and Scanziani [42], and shows a narrow window after neuron 2 receives a spike in which the change in membrane potential is depolarized and neuron 2 is more likely to fire.Following this brief window, the membrane potential is hyperpolarized and the cell is less likely to fire until it receives more excitatory input.
The effective interaction from neuron 1 to 2 in this simple circuit also displays several features that emerge in more complex circuits.Firstly, although the true interactions are either excitatory (positive) or inhibitory (negative), the effective interaction has a mixed character, being initially excitatory (due to excitatory inputs from neuron 1 arriving first through the monosynaptic pathway), but then becoming inhibitory (due to inhibitory input arriving from the disynaptic pathway).
Secondly, emergent timescales develop due to reverberations between hidden neurons with bi-directional connections, represented as loops between neurons in our circuit schematics (e.g., between neurons 3 and 4 in Fig. 4).This includes self-history interactions such as refractoriness, schematically represented by loops like the 3 → 3 loop shown in Fig. 3, corresponding to the factor 1/(1 − γ 3 Ĵ3,3 (ω))).In the particular example shown in Fig. 3, in which we use a self-history interaction J 33 (τ ) = J 33 β 33 exp(−β 33 τ ), a new timescale β −1 33 (1 − γ 3 J 33 ) −1 develops.Other choices of interactions can generate more complicated emergent timescales and temporal dynamics, including oscillations.For example, in the 4-neuron circuit discussed below (Fig. 4), the choice J 3,4 (τ ) = J 4,3 (τ ) = −|J |α 2 τ e −ατ yields effective interactions with new decay and oscillatory timescales equal to (α(1 − λ 0 |J |)) −1 and (αλ 0 |J |) −1 .In the larger networks we consider in the next section, inter-neuron interactions must scale with network size in order to maintain network stability.Because emergent timescales depend on the synaptic strengths of hidden neurons, we typically expect emergent timescales generated by loops between hidden neurons to be negligible in large random networks.However, because the magnitudes of the self-history interaction strengths need not scale with network size, they may generate emergent timescales large enough to be detected.
It is worth noting explicitly that only the interaction from neuron 1 to 2 has been modified by the presence of the hidden neuron 3, for the particular wiring diagram shown in Fig. 3.The self-history interactions of both neurons 1 and 2, as well as the interaction from neuron 2 to 1 (zero in this case) are unmodified.The reason the hidden neuron did not modify these interactions is that the only link neuron 3 makes is from 1 to 2. There is no path by which neuron 1 can send a signal back to itself, hence its self-interaction is unmodified, nor is there a path that neuron 2 can send signals to neuron 3 or on to neuron 1, and hence neuron 2's self-history interaction and its interaction to neuron 1 are unmodified.

Degeneracy of hidden networks giving rise to effective interactions
It is well known that different networks may produce the same observed circuit phenomena [33][34][35][36][37][38].To illustrate that our approach may be used to identify degenerate solutions in which more than one network underlies observed effective interactions, we construct a 4-neuron circuit that produces a quantitatively similar effective interaction between the recorded neurons 1 and 2, shown in Fig. 4. Specifically, in this circuit we have removed neuron 3's self-history interaction and introduced a second inhibitory hidden network that receives excitatory input from neuron 1 and provides inhibitory input to neuron 3.By tuning the interaction strengths we are able to produce the desired effective interaction.This demonstrates that intrinsic neural properties such as refractoriness can trade off against inputs from other hidden neurons, making it difficult to distinguish the two cases from one another (or from a potentially infinity of other circuits that could have produced this interaction; for example, a qualitatively similar interaction is produced in the N = 1000 network in which only three neurons are recorded, shown below in Fig. 6).Statistical inference methods may favor one of the possible underlying choices of complete network consistent with a measured set of effective interactions, suggesting there may be some sense of a "best" solution.However, the particular "best" network will depend on many factors, including the amount and fidelity of data recorded, regularization choices, and how well the fitted model generalizes to new data (i.e., how "close" the fitted model is to the generative model).Potentially, if these conditions were met, with enough data the slight quantitative differences between the effective interactions produced by different hidden networks (including higher order effective interactions, which we assume to be negligible here; see SI), could help distinguish different hidden networks.However, the amount of data required to perform this discrimination and validate the result may be impractically large [35,[62][63][64].It is thus worth studying the structure of the observed effective interactions directly in Fig 3 .3 neuron feedforward inhibition circuit.A: A 3-neuron circuit displaying feedforward inhibition.Neuron 1 provides excitatory input to neurons 2 and 3, while neuron 3 provides inhibitory input to neuron 2. Neuron 3 also has a self-history coupling, denoted by an autaptic loop, which implements a refractory period in this circuit model.B: Leftmost, the effective interaction from neuron 1 to 2 when neuron 3 is unobserved.Subsequent plots decompose this interaction into contributions from neuron 1's direct input to neuron 2, and its indirect input through neuron 3. The indirect input through neuron 3 also takes account of neuron 3's self-history interaction.C. Leftmost, the effective interaction (membrane response) from neuron 1 to 2, subsequently decomposed into contributions from the direct interaction and the indirect interaction from 1 to 2. Different complete circuits may underly similar effective circuits.A: A circuit very similar to that in Fig. 3, except that neuron 1 also provides excitatory input to neuron 4, which in turn provides inhibitory input to neuron 3. The self-history coupling of neuron 3 to itself has also been removed in this example.B: Leftmost, the effective interaction from neuron 1 to 2, which is qualitatively and quantitatively similar to the effective interaction shown in Fig. 3. Subsequent plots indicate each path through the circuit that neuron 1 can send a signal to neuron 2 through the hidden neurons 3 and 4. C. Leftmost, the effective interaction from neuron 1 to 2. Subsequent plots decompose this interaction into contributions from the paths shown above in B.
search of possible signatures that elucidate the statistical properties of the complete network.

Strongly coupled large networks
Constructing networks that produce particular effective interactions is tractable for small circuits, but much more difficult for larger circuits composed of many circuit motifs.Not only can combinations of different circuit motifs interact in unexpected ways, one must also take care to ensure the resulting network is both active and stable-i.e., that firing will neither die out nor skyrocket to the maximum rate.Stability in networks is often implemented by either building networks with classical (or "weak") synapses whose strength scales inversely with the number of inputs they receive, assumed here to be proportional to network size, and hence J i,j ∼ 1/N , or by building balanced networks in which excitatory and inhibitory synaptic strengths balance out, on average, and scale as J i,j ∼ 1/ √ N [43,47].In both cases the synapses tend to be small in value in large networks, but are compensated for by large numbers of incoming connections.In the case of 1/N scaling, neurons are driven primarily by the mean of their inputs, while in "strong" balanced 1/ √ N networks neurons are driven primarily by fluctuations in their inputs.
Our goal is to understand how the interplay between the presence of hidden neurons and different synaptic scaling or network architectures shapes effective interactions.Previous work has studied the hidden-neuron problem in the weak coupling limit [48][49][50][51] using a different approach to relate inferred synaptic parameters to true parameters; here we use our approach to study the 1/ √ N strong coupling limit, theoretically predicted to be an important feature that supports computations in networks in a balanced regime [43][44][45][46].Moreover, experiments in cultured neural tissue have been found to be more consistent with the 1/ √ N scaling than 1/N [47], indicating that it may have intrinsic physiological importance.
We analytically determine how significantly effective interaction strengths are skewed away from the true interaction strengths as a function of both the number of observed neurons and typical synaptic strength.We consider several simple networks ubiquitous in neural modeling: first, an Erdős-Réyni (ER) network with "mixed synapses" (i.e., a neuron may have both positive and negative synaptic weights), a balanced ER network with Dale's law imposed (a neuron's synapses are all the same sign), and a Watts-Strogatz (WS) small world network with mixed synapses.Each network has N neurons and connection sparsity p (only 100p% of connections are non-zero).Connections in ER networks are chosen randomly and independently, while connections in the WS network are determined by randomly rewiring a fraction β of the connections in a (pN ) th -nearest-neighbor ring network.In each network N rec neurons are recorded randomly.
For simplicity we take the baselines of all neurons to be equal, µ i = µ 0 (such that in the absence of synaptic input the probability that a neuron fires in a short time window ∆t is λ 0 ∆t exp(µ 0 )).We choose the rate nonlinearity to be exponential, φ(x) = e x ; this is the "canonical" choice of nonlinearity often used when fitting this model to data [16-18, 20, 65].We will further assume exp(µ 0 ) 1, so that we may use this as a small control parameter.For i = j, the non-zero synaptic weights between neurons J i,j are independently drawn from a normal distribution with zero mean and standard deviation J 0 /(pN ) 2a , where J 0 controls the overall strength of the weights and a = 1 or 1/2, corresponding to "weak" and "strong" coupling.For simplicity, we do not consider intrinsic self-coupling effects in this part of the analysis, i.e., we take J i,i = 0 for all neurons i.For the Dale's law network, the overall distribution of synaptic weights follows the same normal distribution as the mixed synapse networks, but the signs of the weights correspond to whether the pre-synaptic neuron is excitatory or inhibitory.Neurons are randomly chosen to be excitatory and inhibitory, the average number of each type being equal so that the network is balanced.Numerical values of all parameters are given in Table 1 in the Methods.
We seek to assess how the presence of hidden neurons can shape measured network interactions.We first focus on the typical strength of the effective interactions as a function of both the fraction of neurons recorded, f = N rec /N , and the strength of the synaptic weights J 0 .We quantify the strength of the effective interactions by defining the effective synaptic weights J eff r,r ≡ ∞ 0 dτ J eff r,r (τ ) = Ĵeff r,r (ω = 0); c.f. J r,r = ∞ 0 dτ J r,r (τ ) for the true synaptic weights.We then study the sample statistics of the difference, J eff r,r − J r,r , averaged across both subsets of recorded neurons and network instantiations, to estimate the typical contribution of hidden neurons to the measured interactions.The mean of the synaptic weights is near zero (because the weights are normally distributed with zero mean in the mixed synapse networks and due to balance of excitatory and inhibitory neurons in the Dale's law network), so we focus on the root-mean-square of J eff r,r − J r,r .This measure is a conservative estimate of changes in strength, as J eff r,r (τ ) may have both positive and negative components that partially cancel when integrated over time, unlike J r,r (τ ).An alternative measure we could have chosen that avoids potential cancellations is ∞ 0 dτ |J eff r,r (τ ) − J r,r (τ )|, i.e., the integrated absolute difference between effective and true interactions.However, this will depend on our specific choices of waveform g(τ ), whereas J eff r,r − J r,r does not due to our normalization ∞ 0 dτ g(τ ) = 1.As dτ f (τ ) ≤ dτ |f (τ )|, for any f (τ ), we can consider our choice of J eff r,r − J r,r as a lower bound on the strength that would be quantified by |. Numerical evaluations of the population statistics for all three network types are shown as solid curves in Fig. (5), for both strong coupling and weak coupling.All three networks yield qualitatively similar results.The vertical axes measure the root-mean-square deviations between the statistically expected true synaptic J r,r and the corresponding effective synaptic weight J eff r,r , normalized by the true root mean square of J r,r .Thus, a ratio of 0.5 corresponds to a 50% root-mean difference in effective versus true synaptic strength.We measure these ratios as a function of both the fraction of neurons recorded (horizontal axis) and the parameter J 0 (labeled curves).
There are two striking effects.First, deviations are nearly negligible (O(1/ √ pN )) for 1/N scaling of connections.Thus, for large networks with synapses that scale with the system size, vast numbers of hidden neurons combine to have negligible effect on effective couplings.This is in marked contrast to the case when coupling is strong (1/ √ N scaling), when hidden neurons have a pronounced impact (O( 1)).This is particularly the case when f 1-the typical experimental case in which the hidden neurons outnumber observed ones by orders of magnitude-or when J 0 1.0, when typical deviations become half the magnitude of the true couplings themselves (upper blue line).For J 0 1.0, the network activity is unstable for an exponential nonlinearity.
To gain analytical insight into these numerical results, we calculate the standard deviation σ[J eff r,r − J r,r ], normalized by σ[J r,r ], for contributions from paths up to length-3, focusing on the case of the ER network with mixed synapses (the Dale's law and WS networks are more complicated, as the moments of the synaptic weights depend on the identity of the neurons).For strong 1/ √ N coupling we find corresponding to the black dashed curves in Fig. 5 left.Eq. ( 4) is a truncation of a series in powers of λ 0 J 0 e µ0 √ 1 − f , where f = N rec /N is the fraction of recorded neurons.The most important feature of this series is the fact that it only depends on the fraction of recorded neurons f , not the absolute number, N .Contributions from long paths remain finite, even as N → ∞.In contrast, the corresponding expression for σ[J eff r,r − J r,r ]/σ[J r,r ] in the case of weak 1/N coupling is a series is in powers of λ 0 J 0 e µ0 (1 − f )/(pN ), so that contributions from long paths are negligible in large networks N 1. (See [65] for derivation and results for N = 100.)Deviations of Eq. ( 4) from the numerical solutions in Fig. 5 indicate that contributions from truncated terms are not negligible when f 1.As these terms correspond to paths of length-4 or more, this shows that long chains through the network contribute significantly to shaping effective interactions.Relative changes in interaction strength due to hidden neurons for three network types.We quantify relative changes in interaction strength between effective (J eff r,r ) and true (J r,r ) interactions by the (sample) root-square-mean deviation, σ[J eff r,r − J r,r ], normalized by the true synaptic weight (sample) standard deviation σ[J r,r ].We do so for three (sparse) network types: Left.An Erdős-Réyni (ER) network with "mixed synapses" (i.e., Dale's law not imposed) with normally distributed synaptic weights.Middle.An ER network with Dale's law imposed, (i.e., each neuron's outgoing synaptic weights all have the same sign).Right.A Watts-Strogatz (WS) small world network with 30% rewired connections and mixed synapses.All network types yield qualitatively similar results.In each plot solid lines are numerical estimates of the sample standard deviation of the difference between effective coupling weights J eff r,r and true coupling weights J r,r between neurons r = r , normalized by the standard deviation of J r,r .These estimates account for all paths through hidden neurons.Purple lines correspond to synaptic weights with standard deviation J 0 / √ pN (strong coupling), while grey lines correspond to synaptic weights with standard deviation J 0 /pN (weak coupling).For weak 1/N coupling (grey), the ratio of standard deviations is and grows in strength as the fraction of recorded neurons N rec /N decreases or the typical synaptic strength J 0 increases.The dashed black lines in the left plot show theoretical estimates accounting only for hidden paths of length-3 connecting recorded neurons (Eq.( 4).Deviations from the length-3 prediction at small f and large J 0 indicate that contributions from circuit paths involving many hidden neurons are significant in these regimes.
The above analysis demonstrates that the strength of the effective interactions can deviate from that of the true direct interactions by as much as 50%.However, changes in strength do not give us the full picture-we must also investigate how the temporal dynamics of the effective interactions change.To illustrate how hidden units can skew temporal dynamics, in Fig. 6 we plot the effective vs. true interactions between N rec = 3 neurons in an N = 1000 neuron network.Because the three network types considered in Fig. 5 yield qualitatively similar results, we focus on the Erdős-Réyni network with mixed synapses.
Four of the true interactions between neurons shown in Fig. 6 are non-zero (J eff 1,2 (t), J eff 3,2 (t), J eff 3,1 (t), and J eff 2,3 (t)).Of these, three exhibit only slight differences between the true and effective interactions: J eff 1,2 (t) and J eff 3,1 (t) have slightly longer decay timescales than their true counterparts, while J eff 2,3 (t) has a slightly shorter timescale, indicating the contribution of the hidden network to these interactions was either small or cancelled out.However, the interaction J eff 3,2 (t) differs significantly from the true interaction, becoming initially excitatory but switching to inhibitory after a short time, as in our earlier example case of feedforward inhibition.This indicates that neuron 2 must drive a cascade of neurons that ultimately provide inhibitory input to neuron 3.
Contrasting the true and effective interactions shown in Fig. 6 highlights many of the ways in which hidden neurons skew the temporal properties of measured interactions.An immediately obvious difference is that although the true synaptic connections in the network are sparse, the effective interactions are not.This is a generic feature of the effective interaction matrix, as in order for an effective interaction from a neuron r to r to be identically zero there cannot be any paths through the network by which r can send a signal to r.In a random network the probability that there are no paths connecting two nodes tends to zero as the network size N grows large.Note that this includes paths by which each neuron can send a signal back to itself, hence the neurons developed effective self-interactions, even though the true self-interactions are zero in these particular simulations.

Discussion
We have derived a quantitative relationship between "ground-truth" synaptic interactions and the effective interactions (interpreted here as post-synaptic membrane responses) that unobserved neurons generate between subsets of observed neurons.This relationship, Eq. ( 2) and Fig. 2, provides a foundation for studying how different network architectures and neural properties shape the effective interactions between subsets of observed neurons.Our approach can be also be used to study higher order effective interactions between 3 or more neurons, and can be systematically extended to account for corrections to our mean-field approximations and investigate effective noise generated by hidden neurons (using field theoretic techniques from [52], see SI), as well as time-dependent external drives or steady-states.
Here, as first explorations, we focused on the effective interactions corresponding to linear membrane responses.We first demonstrated that our approach applied to small feedforward inhibitory circuits yields effective interactions that capture the role of inhibition in shortening the time window for spiking, and are qualitatively similar to experimentally observed measurements [42].Moreover, we used this example to demonstrate explicitly that different hidden networks can give rise to the same effective interactions between neurons.We then showed that the influence of hidden neurons can remain significant even in large networks in which the typical synaptic strengths scale with network size.In particular, when the synaptic weights scale as 1/ √ N , the relative influence of hidden neurons depends only on the fraction of neurons recorded.Together with theoretical and experimental evidence for this scaling in cortical slices [43][44][45][46][47], this suggests that neural interactions inferred from cortical activity data may differ markedly from the true interactions and connectivity.
The issue of degeneracy in complex biological systems and networks has been discussed at length in the literature, in the context of both inherent degeneracies-multiple different network architectures can produce the same qualitative behaviors [33,[36][37][38], as well as degeneracies in our model descriptions-many models may reproduce experimental observations, demanding sometimes arbitrary criteria for selecting one model over another.All have implications for how successfully one can infer unobserved network properties.One kind of model degeneracy, "sloppiness" [34,63], describes models in which the behavior of the model Effective interactions between recorded neurons differ qualitatively from true interactions.Effective interactions J eff r,r (t) (solid purple) versus true coupling filters (dashed black) for N rec = 3 recorded neurons in a network of N = 1000 total neurons.Inset labels i ← j indicate the interaction is from neuron j to i, for i, j ∈ {1, 2, 3}.The simulated network has an Erdős-Réyni connectivity with sparsity p = 0.2 and normally distributed non-zero weights with zero mean and standard deviation 1/ √ pN .Although the network is sparse, the effective interactions are not: non-zero effective interactions develop where no direct connection exists.The effective interactions can differ qualitatively from the true interactions, as evidenced by the biphasic 3 ← 2 effective interaction, whereas the true 3 ← 2 is purely excitatory. is sensitive to changes in only a relatively small number of directions in parameter space.Many models of biological systems have been shown to be sloppy [34]; this could account for experimentally observed networks that are quite different in composition but produce remarkably similar behaviors.Sloppiness suggests that rather than trying to infer all properties of a hidden network, there may be certain parameter combinations that are much more important to the overall network operation, and could potentially be inferred from subsampled observations.Another perspective on model degeneracy comes from the concepts of "universality" that occur in random matrix theory [66,67] and Renormalization Group methods of statistical physics [62].Many bulk properties of matrices (e.g., the distribution of eigenvalues) whose entrees are combinations random variables, such as our J eff r,r , are universal in that they depend on only a few key details of the distribution that individual elements are drawn from [68].Similarly, one of the central results of the Renormalization Group shows that models with drastically disparate features may yield the same coarse-grained model structure when many degrees of freedom are averaged out, as in our case of approximately averaging out hidden neurons.Different distributions (in the case of random matrix theory) or different models (in the case of the Renormalization group) that yield the same bulk properties or coarse-grained models are said to be in the same "universality class."Measuring particular quantities under a range of experimental conditions (e.g., different stimuli) may be able to reveal which universality class an experimental system belongs to and eliminate models belonging to other universality classes as candidate generating models of the data, but these measurements cannot distinguish between models within a universality class.As our network of subsampled neurons can be thought of as a model in which the hidden network has been approximately averaged over, this means we can potentially use Eq. ( 2) to rule out sets of models of the hidden network that are inconsistent with measured sets of effective interactions J eff r,r (t) (e.g., hidden networks with given network statistics), even if we are unable to uniquely pin down the true hidden network (i.e., the exact or even approximate configuration of network parameters drawn those statistical distributions).
The fact that many different hidden networks may yield the same set of effective interactions suggests that the effective interactions themselves may yield direct insight into a circuit's functions.For instance, many circuits consist of principal neurons that transmit the results of circuit computation to downstream circuitry, but often do not make direct connections with one another, instead interacting through (predominantly inhibitory) intermediaries called interneurons.From the point of view of a downstream circuit, the principal neurons are "recorded" and the interneurons are "hidden."A potential reason for this general arrangement is that direct synaptic interactions alone are insufficient to produce the membrane responses required to perform the circuit's computations, and the network of interneurons reshapes the membrane responses of projection neurons into effective interactions that can perform the desired computations-it may thus be that the effective interactions should be of primary interest, not necessarily the (possibly degenerate choices of) physiological synaptic interactions.For example, in the feedforward inhibitory circuits of Figs. 3  and 4, the roles of the hidden inhibitory neurons may simply be to act as interneurons that reshape the interaction between the excitatory projection neurons 1 and 2, and the choice of which particular circuit motif is implemented in a real network is determined by other physiological constraints, not only computational requirements.
One of the greatest achievements in systems neuroscience would be the ability to perform targeted modifications to a large neural circuit and selectively alter its suite of computations.This would have powerful applications for both studying a circuit's native computations, but also repurposing circuits or repairing damaged circuitry (due to, e.g., disease).If the computational roles of circuits are indeed most sensitive to the effective interactions between principal neurons, this suggests we can exploit potential degeneracies in the interneuron architecture and intrinsic properties to find some circuit that achieves a desired computation, even if it is not a physiologically natural circuit.Our main result relating effective and true interactions, Eq. ( 2), provides a foundation for future work investigating how to identify sets of circuits that perform a desired set of computations.We have shown in this work that it can be done for small circuits (Figs. 3  and 4), and that the effective interactions in large random networks can be significantly skewed away from the true interactions when synaptic weights scale as 1/ √ N , as observed in experiments [47].This holds promise for identifying principled approaches to tuning or controlling neural interactions, such as by using neuromodulators to adjust interneuron properties or inserting artificial or synthetic circuit implants into neural tissue to act as "hidden" neurons.If successful, this could contribute to the long term goal of using such interventions to aid in reshaping the effective synaptic interactions between diseased neurons, and thereby restore healthy circuit behaviors.

Model definition and details
The firing rate of a neuron i in the full network is given by where λ 0 is a characteristic rate, φ(x) ≥ 0 is a nonlinear function, µ i (potentially a function of some external stimulus θ) is a time-independent tonic drive that sets the baseline firing rate of the neuron in the absence of input from other neurons, µ ext i (t) is an external input current, and J ij (t − t ) is a coupling filter that filters spikes ṅj (t ) fired by presynaptic neuron j at time t , incident on post-synaptic neuron i.We will take µ ext i (t) = 0 for simplicity in this work, focusing on the activity of the network due to the tonic drives µ i (which could be still be interpreted as external tonic inputs, so the activity of the network need not be interpreted as spontaneous activity).
While we need not attach a mechanistic interpretation to these filters, a convenient interpretation is that the nonlinear Hawkes model approximates the stochastic dynamics of a leaky integrate-and-fire network model driven by noisy inputs [54,55].In fact, the nonlinear Hawkes model is equivalent to a current-based integrate-and-fire model in which the deterministic spiking rule (a spike fires when a neuron's membrane potential reaches a threshold value V th ) is replaced by a stochastic spiking rule (the higher a neuron's membrane potential, the higher the probability a neuron will fire a spike).(It can also be mapped directly to a conductance-based in special cases [69]).For completeness, we present the mapping from a leaky integrate-and-fire model with stochastic spiking to Eq. ( 5) in the Supporting Information (SI).

Derivation of effective baselines and coupling filters
To study how hidden neurons affect the inferred properties of recorded neurons, we partition the network into "recorded" neurons, labeled by indices r (with sub-or superscripts to differentiate different recorded neurons, e.g., r and r or r 1 and r 2 ) and "hidden" neurons labeled by indices h (with sub-or superscripts).The rates of these two groups are thus To simplify notation, we write J i,j * ṅj = ∞ −∞ dt J i,j (t − t ) ṅj (t ).If we seek to describe the firing of the recorded neurons only in terms of their own spiking history, input from hidden neurons effectively acts like noise with some mean amount of input.We thus begin by splitting the hidden input to the recorded neurons up into two terms, the mean plus fluctuations around the mean: where E [ ṅh (t)| { ṅr }] denotes the mean activity of the hidden neurons conditioned on the activity of the recorded units, and ξ r (t) are the fluctuations, i.e., ξ r (t) ≡ h J r,h * ( ṅh − E [ ṅh (t)| { ṅr }]).Note that ξ r (t) is also conditional on the activity of the recorded units.
By construction, the mean of the fluctuations is identically zero, while the cross-correlations can be expressed as where C h1,h2 (t 1 , t 2 ) is the cross-correlation between hidden neurons h 1 and h 2 (conditioned on the spiking of recorded neurons).If the autocorrelation of the fluctuations (r = r ) is small compared to the mean input to the recorded neurons ( h J r,h * E [ ṅh (t)| { ṅr }]), or if J r,h is small, then we may neglect these fluctuations and focus only on the effects that the mean input has on the recorded subnetwork.At the level of the mean field theory approximation we make in this work, the spike-train correlations are zero.One can calculate corrections to mean field theory (see SI) to estimate the size of this noise, however, even when this noise is non-negligible it can be treated as a separate input to the recorded neurons, and hence will not alter the form of the effective couplings between neurons.Averaging out the effective noise, however, will generate new interactions between neurons; we leave investigation of this issue for future work.
In order to calculate how hidden input shapes the activity of recorded neurons, we need to calculate the mean E [ ṅh | { ṅr }].This mean input is difficult to calculate in general, especially when conditioned on the activity of the recorded neurons.In principle, the mean can be calculated as This is not a tractable calculation.Taylor series expanding the nonlinearity φ(x) reveals that the mean will depend on all higher cumulants of the hidden unit spike trains, which cannot in general be calculated explicitly.Instead, we again appeal to the fact that in a large, sufficiently connected network, we expect fluctuations to be small, as long as the network is not near a critical point.In this case, we may make a mean field approximation, which amounts to solving the self-consistent equation In general, this equation must be solved numerically.Unfortunately, the conditional dependence on the activity of the recorded neurons presents a problem, as in principle we must solve this equation for all possible patterns of recorded unit activity.Instead, we note that the mean hidden neuron firing rate is a functional of the filtered recorded input I h (t) ≡ r J h,r * ṅr , so we can expand it as a functional Taylor series around some reference filtered activity Within our mean field approximation, the Taylor coefficients are simply the response functions of the network -i.e., the zeroth order coefficient is the mean firing rate of the neurons in the reference state I 0 h (t), the first order coefficient is the linear response function of the network, the second order coefficient is a nonlinear response function, and so on.
There are two natural choices for the reference state I 0 h (t).The first is simply the state of zero recorded unit activity, while the second is the mean activity of the recorded neurons.The zero-activity case conforms to the choice of nonlinear Hawkes models used in practice.Choosing the mean activity as the reference state may be more appropriate if the recorded neurons have high firing rates, but requires adjusting the form of the nonlinear Hawkes model so that firing rates are modulated by filtering the deviations of spikes from the mean firing rate, rather than filtering the spikes themselves.Here, we focus on the zero-activity reference state.We present the formulation for the mean field reference state in the SI.

The mean inputs E [ ṅh |0
] are the mean field approximations to the firing rates of the hidden neurons in the absence of the recorded neurons.Defining ν h ≡ E [ ṅh |0], these firing rates are given by in writing this equation we have assumed that the steady-state mean field firing rates will be time-independent, and hence the convolution . This assumption will generally be valid for at least some parameter regime of the network, but there can be cases where it breaks down, such as if the nonlinearity φ(x) is bounded, in which case a transition to chaotic firing rates ν h (t) may exist (c.f.[70]).The mean field equations for the ν h are a system of transcendental equations that in general cannot be solved exactly.In practice we will solve the equations numerically, but we can develop a series expansion for the solutions (see below).
The next term in the series expansion is the linear response function of the hidden unit network, Γ h,h (t − t ) ≡ δE[ ṅh (t)|0] δI h (t ) , given by the solution to the integral equation The "gain" γ h is defined by where φ (x) is the derivative of the nonlinearity with respect to its argument.For time-independent drives µ r and steady states ν h (and hence γ h ), we may solve for Γ h,h (t − t ) by first converting to the frequency domain and then performing a matrix inverse: If the zero and first order Taylor series coefficients in our expansion of E[ ṅh (t)|{ ṅr }] are the dominant termsi.e., if we may neglect higher order terms in this expansion-then we may approximate the instantaneous firing rates of the recorded neurons by Ĵr,h (ω) Γh,h (ω) Ĵh ,r (ω) are the effective coupling filters in the frequency domain, as given in the main text.In addition to neglecting the higher order spike filtering terms here, we have also neglected fluctuations around the mean input from the hidden network.These fluctuations are zero within our mean field approximation, but we could in principle calculate corrections to the mean field predictions using the techniques of [52]; we do so to estimate the size of the effective noise correlations in the SI.
In the main text, we decompose our expression for Ĵeff r,r (ω) into contributions from all paths that a signal can travel from neuron r to r.To arrive at this interpretation, we note that we can expand Γh,h (ω) in a series over paths through the hidden network.To start, we note that if || V(ω)|| < 1 for some matrix norm || • ||, then the matrix [I − V(ω)] −1 admits a convergent series expansion [71] I − V(ω) where V(ω) is a matrix product and V(ω) 0 ≡ I.We can write an element of the matrix product out as Vh,h1 (ω) Vh1,h2 (ω) . . .Vh −1 ,h (ω) Vh ,h (ω); inserting Vhi,hj (ω) = γ hi Ĵhi,hj (ω) yields This expression can be interpreted in terms of summing over paths through network of hidden neurons that join two observed neurons: the Ĵhi,hj (ω) are represented by edges from neuron h j to h i , and the γ hi are represented by the nodes.In this expansion, we allow edges from one neuron back to itself, meaning we include paths in which signals loop back around to the same neuron arbitrarily many times before the signal is propagated further.However, such loops can be easily factored, contributing a factor We thus remove the need to consider self-loops in our rules for calculating effective coupling filters by assigning a factor γ h /(1 − γ h J h,h (ω)) to each node, as discussed in the main text and depicted in Fig. 2. (The contribution of the self-feedback loops can be derived rigorously; see the SI for the full derivation).
Although we have worked here in the frequency domain, our formalism does adapt straightforwardly to handle time-dependent inputs; however, among the consequences of this explicit time-dependence are that the mean field rates ν h (t) are not only time-dependent, but solutions of a system of nonlinear integral equations, and hence more challenging to solve.Furthermore, quantities like the linear response of the hidden network, Γ h,h (t, t ), will depend on both absolute times t and t , rather than just their difference, t − t , and hence we must also (numerically) solve for Γ h,h (t, t ) directly in the time domain.We leave these challenges for future work.

Model network architectures
Our main result, Eq. ( 2), is valid for general network architectures with arbitrary weighted synaptic connections, so long as the hidden subset of the network has stable dynamics when the recorded neurons are removed.An example for which our method must be modified would be a network in which all or the majority of the hidden neurons are excitatory, as the hidden network is unlikely to be stable when the inhibitory recorded neurons are disconnected.Similarly, we find that synaptic weight distributions with undefined moments will generally cause the network activity to be unstable.For example, J i,j drawn from a Cauchy distribution generally yield unstable network dynamics unless the weights are scaled inversely with a large power of the network size N .

Specific networks-common features
The specific network architectures we study in the main text share several features in common: all are sparse networks with sparsity p (i.e., only a fraction p of connections are non-zero) and non-zero synaptic weight strengths drawn independently from a random distribution with zero population mean and population standard deviation J 0 /(pN ) a ; the overall standard deviation of weights, accounting for the expected 1 − p fraction of zero weights is √ pJ 0 /(pN ) a .The parameter a determines whether the synaptic strengths are "strong" (a = 1/2) or "weak" (a = 1).In most of our analytical results we only need the mean and variances of the weights, so we do not need to specify the exact distribution.In simulations, we use a normal distribution.The reason for scaling the weights as 1/(pN ) a , as opposed to just 1/N a , is that the mean incoming degree of connections is p(N − 1) ≈ pN for large networks; this scaling thus controls for the typical magnitude of incoming synaptic currents.For strongly coupled networks, the combined effect of sparsity and synaptic weight distribution yields an overall standard deviation of √ pJ 0 / √ pN = J 0 / √ N .Because the sparsity parameter p cancels out, it does not matter if we consider p to be fixed or k 0 = pN to be fixed-both cases are equivalent.However, this is not the case if we scale J i,j by 1/k 0 , as the overall standard deviation would then be √ pJ 0 /k 0 , which only corresponds to the weak-coupling limit if p is fixed.If k 0 is fixed, the standard deviation would scale as 1/ √ N .
It is worth noting that the determination of "weak" versus "strong" coupling depends not only on the power of N with which synaptic weights scale, but also on the network architecture and correlation structure of the weights J i,j .For example, for an all-to-all connected matrix with symmetric rank-1 synaptic weights of the form J i,j = ζ i ζ j , where the ζ i are independently distributed normal random variates, the standard deviation of each ζ must scale as 1/ √ N in order for hidden paths to generate O(1) contributions to effective interactions, such that J i,j scales as 1/N but the coupling is still strong.

Specific networks-differences in architecture and synaptic constraints
Beyond the common features outlined above, we perform our analysis of the distribution of effective synaptic interaction strengths for three network architectures commonly studied in network models.These architectures are not intended to be realistic representations of neuronal network structures, but to capture basic features of network architecture and therefore give insight into the basic features of the effective interaction networks.
Erdős-Réyni + mixed synapses-The first network we consider (and the one we perform most of our later analyses on as well) is an Erdős-Réyni random network architecture with "mixed synapses."That is, each connection between neurons is chosen randomly with probably p.By "mixed synapses" we mean that each neuron's outgoing synaptic weights are chosen completely independently.i.e., in this network there are no excitatory or inhibitory neurons; each neuron make make both excitatory and inhibitory connections.The corresponding analysis is shown in Fig. 5A.
Erdős-Réyni + Dale's law imposed -Real neurons appear to split into separate excitatory and inhibitory classes, a dichotomy know as "Dale's law" (or alternatively, "Dale's principle" to highlight that it is not really a law of nature).Neurons in a network that obeys this law will have coupling filters J i,j (t) that are strictly positive for excitatory neurons and strictly negative for inhibitory neurons.This constraint complicates analytic calculations slightly, as the moments of the synaptic weights now depend on the identity of the neuron, and more care must be taken in calculating expected values or population averages.We instead impose this numerically to generate the results shown in Fig. 5B.The trends are the same as in the network with mixed synapses, with the resulting ratios being slightly reduced.
As a technical point, because our analysis requires calculation of the mean field firing rates of the hidden network in absence of the recorded neurons, random sampling of the network may, by chance, yield hidden networks with an imbalance of excitatory neurons, for which the mean field firing rates of the hidden network may diverge for our choice of exponential nonlinearity.This is the origin of the relatively larger error bars in Fig. 5B: less random samplings for which the hidden network was stable were available to perform the computation.One way this artifact can be prevented is by choosing a nonlinearity that saturates, such as φ(x) = c/(1 + exp(−x)), which prevents the mean-field firing rates from diverging and yields stable network activity (see Fig. 8).Another is to choose a different reference state of network activity around which we perform our expansion of E[ ṅh |{ ṅr }], such as the mean field state discussed in the SI.
Watts-Strogatz network + mixed synapses-Finally, although Erdős-Réyni networks are relatively easy to analyze analytically, and are ubiquitous in many influential computational and theoretical studies, real world networks typically have more structure.Therefore, we also consider a network architecture with more structure, a Watts-Strogatz (small world) network.A Watts-Strogatz network is generated by starting with a K-nearest neighbor network (such that fraction of non-zero connections each neuron makes is p = K/(N − 1)) and rewiring a fraction β of those connections.The limit β = 0 remains a K-nearest neighbor network, while β → 1 yields an Erdős-Réyni network.We generated the adjacency matrices of the Watts-Strogatz networks using code available in [72].Here we consider only a Watts-Strogatz network with mixed synapses; a network with spatial structure and Dale's law with become sensitive to both the distribution of excitatory and inhibitory neurons in the network as well as the way in which the neurons are sampled, an investigation we leave for future work.The results for the Watts-Strogatz network with mixed synapses are shown in Fig. 5C, and are qualitatively similar to the Erdős-Réyni netowrk with mixed synapses.
Because all three network types we considered yield qualitatively similar results, for the remainder of our analyses, we focus on the Erdős-Réyni + mixed synapses network for simplicity in both simulations and analytical calculations.
Parameter values used to generate our networks are given in Table 1.

Choice of nonlinearity φ(x)
The nonlinear function φ(x) sets the instantaneous firing rate for the neurons in our model.Our main analytical results (e.g., Eq. ( 2) hold for arbitrary choice of φ(x).Where specific choices are required in order to perform simulations, we used φ(x) = max(x, 0) for the results presented in Figs. 3 and 4 and φ(x) = exp(x) otherwise.The rectified linear choice is convenient for small networks, as high-order derivatives are zero, which eliminates corresponding high-order "loop corrections" to mean field theory [52].The exponential function is the "canonical" choice of nonlinearity for the nonlinear Hawkes process [16][17][18]20].The exponential has particularly nice theoretical properties, but is also convenient for fitting the nonlinear Hawkes model to data, as the log-likelihood function of the model simplifies considerably and is convex (though some similar families of nonlinearities also yield convex log-likelihood functions).An important property that both choices of nonlinearity possess is that they are unbounded.This property is necessary to guarantee that a neuron spikes given enough input.A bounded nonlinearity imposes a maximum firing rate, and neurons cannot be forced to spike reliably by providing a large bolus of input.The downside of an unbounded nonlinearity is that it is possible for the average firing rates to diverge, and the network never reaches a steady state.For example, in a purely excitatory network (all J i,j ≥ 0) with an exponential nonlinearity, neural firing will run away without a sufficiently strong self-refractory coupling to suppress the firing rate.This will not occur with a bounded nonlinearity, as excitation can only drive neurons to fire at some maximum but finite rate.
This can be a problem in simulations of networks obeying Dale's law.For unbounded nonlinearities, the mean field theory for the hidden network occasionally does not exist due to an imbalance of excitatory and inhibitory neurons caused by our random selection of recorded of neurons.However, the Dale's law network is stable if the nonlinearity is bounded.We demonstrate this below in Figs.7 and 8, comparing simulations of the effective interaction statistics in Erdős-Réyni networks with and without Dale's law for a sigmoidal nonlinearity φ(x) = 2/(1 + e −x ).
Another consequence of unbounded nonlinearities is that the mean firing rates are either finite or they diverge.Bounded nonlinearities, on the other hand, may allow for the possibility of a transition to chaotic dynamics in the mean-field firing rate dynamics (cf. the results of the [70]).

Specific choices of network properties used to generate figures
Feedforward-inhibitiory circuit model details 3 neuron circuit (Fig. 3) Using our graphical rules (Fig. 2), we calculated the effective interaction from neuron 1 to 2 for the circuit shown in Fig. 3A, giving Eq. 3. In principle, our mean field approximation would not be expected to hold for such a small circuit; in particular, loop corrections [52] to our calculation of the rate ν 3 and associated gain γ 3 might be significant.However, as loop corrections depend on derivatives of the nonlinearity φ(x), we can minimize these errors by choosing φ(x) = max(x, 0), for which φ (x) = Θ(x), the Heaviside step function.Accordingly, we can solve for ν 3 = λ 0 µ 3 /(1 − λ 0 J 33 ) and γ 3 = λ 0 for this particular network.
To generate the plots shown in Fig. 3C, we take the inter-neuron couplings to have the form J i,j (τ ) = J i,j α 2 i,j τ e −αi,j τ and the self-history couplings to have the form J i,i (τ ) = J i,i β i,i e −βi,iτ .Using Mathematica to perform the inverse Fourier transform, we obtain an explicit expression for the effective interaction, In order for the inverse Fourier transform to converge and result in a causal function, we require that 1 − λ 0 J 33 > 0.
Parameter values used to generate the plots in Fig. 3C are given in Table 2. 4 neuron circuit (Fig. 4) Like for the 3-neuron circuit, we can use our graphical rules (Fig. 2) to calculate the effective interaction for our 4-neuron circuit (Fig. 4A) in the frequency domain: in going to the last equality we have separated the terms out into contributions from each of the paths, in order, shown in Fig. 4B.
Inverting the Fourier transform using Mathematica yields In order for this result to converge, we require |J 34 ||J 43 | < 1. Splitting this result up into the contributions to each plot in Fig. 4C, using the specific parameter choices λ 0 = 1 and J 34 = J 43 ≡ J , gives Parameter values used to generate the plots in Fig. 4C are given in Table 3.

Large networks
To generate the results in Fig. 6 in the main text, we choose the coupling filters to be J i,j (t) = J i,j α 2 te −αt , for i = j, which has Fourier transform Ĵi,j (ω) = J i,j α 2 (α + iω) 2 , The weight matrix J is generated as described in "Model network architectures," choosing J 0 = 1.0.We partition this network up into recorded and hidden subsets.For a network of N neurons, we choose neurons 1 to N rec to be recorded, and the remainder to be hidden, hence we define (using an index notation starting at 1; indices should be subtracted by 1 for 0-based index counting) J RH = J [1 : N rec , (N rec + 1) : N ], and We numerically calculate the linear response matrix Γ(ω) by evaluating where V HH h,h (ω) = γ h J h,h (ω) and diag( γ) is an N hid × N hid diagonal matrix with elements γ h .The effective coupling filter in the frequency domain can then be evaluated pointwise at a desired set of frequencies ω by matrix multiplication, We then return to the time domain by inverse Fourier transforming the result, achieved by treating Ĵeff (ω) as an N rec × N rec × N freq array (where N freq is the number of frequencies at which we evaluate the effective coupling) and multiplying along the frequency dimension by an N freq × N time matrix E with elements E ω,t = exp(iωt)∆t/(2π), for N time sufficiently small time bins of size δt = 0.1/α, for α = 10, as listed in Table 4.
To generate Fig. 5, we focus on the zero-frequency component of Ĵeff (ω), which is also equal to the time integral of J eff (t).As in the main text, we label the elements of this component J eff r,r = Ĵeff r,r (ω = 0), which is equal to We do not need to simulate the full network to study the statistics of J eff r,r .We only need to generate samples of the matrix J and evaluate Γ(0).This is where the choice of an Erdős-Réyni network that is not restricted to obey Dale's law becomes convenient.Because the weights J i,j are i.i.d. and the sign of the weight is random, population averages will be equivalent to expected values.i.e., the sample mean will tend to the expected values E[J eff r,r ] and var[J eff r,r ] for large networks.We have explicitly removed the diagonal elements from these averages because these elements will have slightly different statistics from the off-diagonal elements due to the fact that all ground-truth self-couplings are set to zero, J r,r = 0.This allows us to compare the population variance, plotted in Fig. 5 (after normalization by the population variance of the true off-diagonal weights), to the expected variance calculated analytically below.
The error bars in Fig. 5 are generated by first drawing a single sample of true weights J , and then taking 100 random subsets of N rec = {10, 110, 210, 310, 410, 510, 610, 710, 810, 910, 999} recorded neurons.For this analysis, random subsets were generated by permuting the indices of the full weight matrix J and taking the last N rec neurons to be recorded.For each random subset of the network we calculate the population statistics.The standard error of, for example, the population variance Jvar across subsets gives an estimate of the error.However, if we only use a single sample of the network architecture and weights J i,j , this estimate may depend on the particular instantiation of the network.To average over the effects of global network architecture, we draw a total of 10 network architecture samples, and average a second time over these samples to obtain our final estimates of the population variance of J eff r,r .We note that for an Erdős-Réyni network with mixed synapses, this second stage of averaging is probabilistically unnecessary: for a large enough network random subsets of a single large network are statistically identical to random subsets drawn from several samples of full Erdős-Réyni networks.However, this will not be true for networks with more structure, such as the Watts-Strogatz or Dale's law networks we also considered, for which the second stage of averaging over the global network architecture is necessary to average over network configurations.
Series approximation for the mean field firing rates for the case of exponential nonlinearity φ(x) = e x The mean field firing rates for the hidden neurons are given by where we focus specifically on the case of exponential nonlinearity φ(x) = exp(x).For this choice of nonlinearity, γ h = ν h , so we do not need to calculate a separate series for the gains.
This system of transcendental equations generally cannot be solved analytically.However, for small exp(µ h ) 1 we can derive, recursively, a series expansion for the firing rates.We first consider the case of µ h = µ 0 for all hidden neurons h.Let = exp(µ 0 ).We may then write Plugging this into the mean field equation, Thus, matching powers of λ 0 on the left and right hand sides, we find a For = 1, the sum in m truncates at m = 1 (as δ , 1 +•••+ m+m is zero for m > , as all indices are positive).Thus, a With this we have calculated the firing rates to O( 4 ).The analysis can be straightforwardly extended to the case of heterogeneous µ h , though it becomes more tedious to compute terms in the (now multivariate) series.Assuming h ≡ exp(µ h ) 1 for all h, to O( 3 ) we find Variance of the effective coupling to second order in N rec /N & fourth order in λ 0 J 0 e µ 0 (exponential nonlinearity) To estimate the strength of the hidden paths, we would like to calculate the variance of the effective coupling J eff r,r and compare its strength to the variance of the direct couplings J r,r , where J eff r,r ≡ ∞ 0 dt J eff r,r (t) and J r,r ≡ ∞ 0 dt J eff r,r (t), as in the main text.
We assume that the synaptic weights J i,j are independently and identically distributed with zero mean and variance var(J ) = p J 2 0 (pN ) 2a for i = j, where a = 1 corresponds to weak coupling and a = 1/2 corresponds to strong coupling.We assume no self-couplings, J i,i = 0 for all neurons i.The overall factor of p in var[J ] comes from the sparsity of the network.For example, for normally distributed non-zero weights with variance J 2 0 /N 2a , the total probability for every connection in the network is Because the J i,j are i.i.d., the mean of J eff r,r : where we used the fact that Γh,h ≡ Γh,h (0) depends only on the hidden neuron couplings J h,h , which are independent of the couplings to the recorded neurons, J r,h and J h ,r .This holds for any pair of neurons (r, r ), including r = r because of the assumption of no self-coupling.The variance of J eff r,r is thus equal to the mean of its square, for r = r , In this derivation, we used the fact that J r,h1 J r,h2 = J 2 r,h1 δ h1,h2 due to the fact that the synaptic weights are uncorrelated.We now need to compute Γ2 h,h .This is intractable in general, so we will resort to calculating this in a series expansion in powers of ≡ exp(µ 0 ) for the exponential nonlinearity model.Our result will also turn out to be an expansion in powers of J 0 and 1 − f ≡ N hid /N .
The lowest order approximation is obtained by the approximation ν h ≈ λ 0 and Γ h,h ≈ ν h δ h,h , yielding This result varies linearly with f , while numerical evaluation of the variance shows obvious curvature for f 1 and J 0 1, so we need to go to higher order.This becomes tedious very quickly, so we will only work to O( 4 ) (it turns out O( 3 ) corrections vanish).
We calculate Γ2 h,h using a recursive strategy, though we could also use the path-length series expression for Γh,h (ω), keeping terms up to fourth order in .We begin with the expression and plug it into itself until we obtain an expression to a desired order in .In doing so, we note that ν h ∼ O( ), so we will first work to fourth order in ν h , and then plug in the series for ν h in powers of .
We begin with The third order term ν 3 h J h,h δ h,h vanished because we assume no self-couplings.We have obtained Γ2 h,h to fourth order in ν h ; now we need to plug in the series expression for ν h to obtain the series in powers of λ 0 .We will do this order by order in ν h .The easiest terms are the fourth order terms, as The second order term is where a h,h1,h2 = J h,h1 J h1,h2 + 1 2 J h,h1 J h,h2 .We need the average ν 2 h .The third-order term will vanish upon averaging, and 2a using the fact that synaptic weights are independent (giving the δ h1,h2 factor) and self-couplings are zero (giving the 1 − δ h,h1 factor).We thus obtain The first fourth order term in Γ2 h,h , 2 h ν 3 h ν h J h,h J h ,h δ h,h , will vanish upon averaging because matching indices requires h = h = h and we assume no self-couplings.The second fourth order term is J 2 h,h , which averages to var[J ](1 − δ h,h ), where the factor of (1 − δ h,h ) again accounts for the fact that this term does not contribute when h = h due to no self-couplings.We thus arrive at Putting everything together, For weak coupling, this tends to 1 in the N 1 limit, as N hid var[J ] = (1 − f )J 2 0 /N → 0, for fixed fraction of observed neurons f = N rec /N .For strong coupling, N hid var[J ] = (1 − f )J 2 0 , which is constant as N → ∞, and hence var J eff r,r where we have used little-o notation to denote that there are higher order terms dominated by (λ 0 J 0 ) 4 (1−f ) 2 .With this expression, we have improved on our approximation of the relative variance of the effective coupling to the true coupling; however, the neglected higher order terms still become significant as f → 0 and J 0 → 1, indicating that hidden paths have a significant impact when synaptic strengths are moderately strong and only a small fraction of the neurons have been observed.Because the synaptic weights J i,j are independent, we may rewrite Eq. ( 8) as or, in terms of the ratio of standard deviations, where we used the approximation √ 1 + x ≈ 1 + x/2 for x small.In the main text, we plotted results for N = 1000 total neurons (Fig. 5A).For strongly coupled networks, the results should only depend on the fraction of observed neurons, f = N rec /N , while for weak coupling the results do depend on the absolute number N .To demonstrate this, in Fig. 9 we remake Fig. 5 for N = 100 neurons.We see that the strongly coupled results have not been significantly altered, whereas the weakly coupled results yield stronger deviations (as the deviations are O(1/ √ N )).where τ m is the membrane time constant of the neuron, E L is its reversal potential, E ext i (t) is an external current input (converted to a voltage by dividing by the membrane resistance), and are the synaptic currents flowing into neuron i from presynaptic neurons j, where ṅj (t ) is the spike train from presynaptic neuron j at time t and Jij (t − t ) is a spike filter.For notational convenience we also include the self-history coupling Ji,i (t − t ) in this term, though it has a physiologically different origin, representing refractory effects that reset a neuron's voltage after it spikes, rather than having a hard reset.Similarly, rather than having a hard firing threshold, we assume that neurons spike stochastically with an instantaneous rate where λ 0 sets a baseline firing rate, φ(•) ≥ 0 is a nonlinear function of the membrane voltage, E th is a "soft" threshold value, E s sets the steepness of the nonlinearity, and V i (t) is the membrane voltage given in Eq. ( 9).We term this the instantaneous firing rate because it is equal to the the trial-averaged spike trains ṅi (t), conditioned on the inputs to the neuron.The value E th is a soft-threshold because while it is likely the neuron will fire when V i (t) reaches E th , it is possible the neuron will fire at higher or lower voltage.In this work we assume that the probability that the number of spikes neuron i fires in a small time window ∆t around time t, given its input history, is ṅi (t)∆t ∼ Poiss [λ i (t)∆t] ; however, we could have chosen many other point processes with instantaneous rates λ i (t).Note that while spiking is stochastic, a neuron is guaranteed to fire at times when its instantaneous rate λ i (t) diverges, so there is some sense of deterministic output retained.We can formally solve the membrane equation ( 9), giving We now define i.e., we have shown the the soft-threshold leaky integrate-and-fire model is equivalent to a nonlinear Hawkes model, Eq. ( 5).Because the argument of the rate is now expressed entirely in terms of the spiking of the neurons, and not the membrane voltage, we need only simulate the spiking activity of the network; i.e., we do not need to keep track of the membrane voltages and can simply use Eq. ( 5).Lastly, we note that membrane potential dynamics are more appropriately described by changes to a neuron's membrane conductance, rather than current inputs [54].If we insert conductance-based synaptic inputs, such as into Eq.( 9), the voltage equation is still formally solvable, but the rates λ i (t) will no longer be of the form of Eq. ( 5), except in approximate limits or if special conditions are met [69].We leave a more detailed investigation of conductance-based models-including those with nonlinear voltage dependence-for future work.
Complete derivation of the contribution of self-cycles to nodes in Fig. 2 In the Methods section of the full text, we heuristically argued that loops from a neuron back to itself in the series expansion of Γh,h (ω) = [I − V(ω)] −1 h,h could be explicitly summed into a factor 1/(1 − γ h Ĵh,h (ω)) contributed by each node h.This factor can be derived directly; we do so here.
Let us decompose the matrix V(ω) in a diagonal and off-diagonal piece, V(ω) = Vdiag (ω) + Voff (ω).Then, We assumed that I − Vdiag (ω) is invertible, which requires that there is no element for which 1 − γ h Ĵh,h (ω) = 0 for all ω.Assuming this is the case, the inverse of the matrix is trivial to calculate, as it is diagonal: The matrix I − I − Vdiag (ω) can be expressed as a series, as before: Hence, inserting the contribution from the factor I − Vdiag (ω) −1 that we pulled out, and the factor γ h that left-multiplies to give Γh,h (ω), we have This is the same as our previous expression, with γ h → γ h /(1 − γ h Ĵh,h (ω)) and restricting the sum over hidden units such that self-loops are removed (h i = h i+1 ), proving the result described informally above.We note again that this puts restrictions on the allowed size of self-interactions, as the zeros of 1 − γ h Ĵh,h (ω) must be in the upper-half plane of the complex ω plane in order for the filters to be causal and physically meaningful (given our Fourier sign-convention f (ω) = ∞ −∞ dt e −iωt f (t)).The complete expression for the correction term h,h Ĵr,h (ω) Γh,h (ω) Ĵh ,r (ω) is thus This is the exact mathematical expression underlying the graphical rules given in Fig. 2.

Second order nonlinear response function
Higher order terms in the series expansion represent nonlinear response functions.We do not focus on these terms in this work, assuming instead that we can truncate this series expansion at linear order.We will, however, estimate the error incurred by this truncation by calculating the second order response function, which we label Γ h,h1,h2 (t, t 1 , t 2 ).Rather than differentiate our formal solution for the linear response, we differentiate the implicit form, yielding an integral equation Γ h,h1,h2 (t, t 1 , t 2 ) ≡ h,h1,h2 (t , t 1 , t 2 ) where we have defined γ (2) γ h without the superscript is the gain defined previously, Inverting the operator on the left hand side yields the input linear response function (when introducing the factor of 1 = γ h /γ h on the right hand side), giving the solution Because Γ h,h (t − t ) is proportional to γ h , the second order nonlinear response function is proportional to γ h .For an exponential nonlinearity, γ h = γ h = ν h , and the second order response function is of the same order of the linear response (but the overall contribution to network statistics is not of the same order; see below).For a rectified linear nonlinearity (as in Figs. 3 and 4), γ h = 0 and the second-order response vanishes.The effective quadratic interaction from two recorded neurons r 1 and r 2 to neuron r is thus where we have defined the quadratic spike interaction J Estimating the error from neglecting higher order spike filtering (exponential nonlinearity) In the main text we calculate corrections to the baseline and linear spike filters, neglecting higher-order spike filtering and fluctuations around the mean input to the recorded neurons.In the methods we validated this result numerically; here we derive an analytic estimate of the order of the error we incur by neglecting these terms.We will do so within mean field theory (meaning the noise fluctuations contribute zero error as they do not contribute to the mean field approximation).Specifically, we will assume that the quadratic spike filtering term is small, and calculate the corresponding correction to our mean field approximation of the firing rates when this term is completely neglected.If we take as our approximation of the recorded neuron firing instantaneous firing rates then the mean field approximation of the firing rates is where we have used the fact that the average firing rates are independent of time, and replaced J eff r,r (t − t 1 ) and J (2) r,r1,r2 (t, t 1 , t 2 ) with their time integrals, denoted by J eff r,r and J r,r1,r2 .The parameter b is just a book-keeping parameter.
To calculate the lowest order correction to the linear filtering approximation (b → 0), we write ṅr = ν sub r + bν r , treating b formally as a small parameter.The linear firing rate ν sub r is given by For the quadratically-modified firing rates, keeping terms only to linear order in b, Collecting on b and rearranging, r δ r,r − ν sub r J eff r,r νr = ν sub r r1,r2 Because ν sub r ∝ exp(µ eff r ) ∝ exp(µ r ) = r , the expansion parameters we have been using, the lowest order approximation for νr is νr ≈ ν sub r r1,r2 J (2) r,r1,r2 ν sub r1 ν sub r2 .
To evaluate the coefficient J r,r1,r2 , we may use the fact γ h = ν h and to leading order ν h ∼ λ 0 and Γ and hence To lowest order the error term νr is νr = (λ 0 ) 4 h,r1,r2 J r,h J h,r1 J h,r2 .
For J i,j i.i.d., the population average should converge to the expected value, which is zero because the J i,j have mean zero.We can calculate the root-mean-squared-error (RMSE) by looking at the variance: In principle, we should take care to separate out the r 1 = r 2 and r 1 = r 2 terms from the sum, as the latter will contribute a factor J 4 h,r1 , which we have not specified yet (though one could calculate for specific choices, such as the normal distribution that we use for most of our numerical analyses).However, both J 2 h,r 2 and J 4 h,r1 will scale as (J 2 0 /(pN ) 2a ) 2 , so we will neglect constant factors and simply use this scaling to arrive at the result For a = 1 (weak coupling), the error falls off quite quickly as N 3/2 , while it is independent of N for a = 1/2 (strong coupling).However, the error does still scale with the fraction of observed neurons, as f √ 1 − f .This demonstrates that the typical error that arises from neglecting the nonlinear filtering is small both when most neurons have been observed (f 1) and when very few neurons have been observed (f 0).While it may at first seem surprising that the error is small when very few neurons have been observed, the result does make intuitive sense: when a very small fraction of the network is observed, we can treat the unobserved portion of the network as a "reservoir" or "bath."Feedback from the observed neurons into the reservoir has a comparatively small effect, so we can get away with neglecting feedback between the observed and unobserved partitions of the network.However, when the number of observed neurons is comparable to the number of unobserved neurons, neither can be treated as a reservoir, and feedback between the two partitions is substantial.Neglecting the higher order spike filter terms may be inaccurate in this case.The instantaneous firing rates of the neurons can in this way be quickly computed in time steps of a specified size ∆t.The number of spikes n i that neuron i fires in the t th time bin is drawn from a Poisson distribution with probability (λ i (t)∆t) ni exp(−λ i (t)∆t)/(n i )!.An initial transient period of spiking before the network achieves a steady state is discarded.
The parameters we use in our simulations of the full network are given in Table 4.

Validating the mean field approximation
To confirm that the mean field approximation is valid, we seek to compare the empirically measured spike rates measured from simulations of the network activity to the calculated mean field rates.The empirical rates are measured as ṅi emp = number of spikes emitted by neuron i length of spike train window , calculated after discarding the initial transient period of firing, for any neuron i (recorded or hidden).The steady-state mean field firing rates are the solutions of the transcendental equation The only difference between this equation and the equation for ν h is that the neuron indices are not restricted to hidden units.i.e., the ν h are the mean field rates for the hidden neurons only (recorded neurons removed entirely), whereas the ṅi full MFT are the mean field rates for the entire network.If the mean field approximation is valid, the empirical rates should be approximately equal to the mean field rates, so a scatter plot of ṅi MFT versus ṅi emp should roughly lie along the identity line.We test this for a network in the strong coupling limit ( var(J ) = J 0 / √ N ) for four values of J 0 , J 0 = 0.25, 0.5, 0.75, and 1.0.We expect J 0 = 1.0 to be close to the stability threshold of the model based on a linearized analysis [73,74]; i.e., for J 0 1.0 there may not be a steady state, so this may be where we expect the mean field approximation to break down.As seen in Fig. 10, the mean field approximation appears to hold well even up to J 0 = 1.0, though there are some slight deviations for neurons with large rates.

Verifying the linearized conditional mean approximation
Having verified that the mean field approximation is valid, we now seek to check our linearized approximation of the firing rates of the hidden neurons conditioned on the activity of the recorded neurons, E [ ṅh (t)| { ṅr (t)}].That is, we calculated above that the . . .correspond to higher order spike filtering terms that we have neglected in our analyses, assuming them to be small.In an earlier calculation above, we estimated that the error incurred by neglecting higher order spike filtering is of the order (λ 0 exp(µ 0 )) 4 f √ 1 − f J 3 0 , but we would like to confirm the negligibility of the higher order coupling through simulations.
To do so, we compare the empirical firing rates of the designated "hidden" neurons obtained from simulations of the full network models with the approximation of the firing rates of the hidden neurons conditioned on the recorded neurons using the linear expansion, averaged over recorded neuron activity to give ṅh approx ≈ ν h + h ,r Γh,h (0)J h ,r ṅr emp , where as usual the zero-frequency component of the linear response function Γh,h (0) of the hidden neurons is calculated in the absence of recorded neurons.
If we make a scatter plot of this against the empirical estimates of the hidden neurons, ṅh emp , the data points will lie along the identity line if our approximation is valid.If the data deviates from the identity line, it indicates that the neglected higher-order filtering terms contribute substantially to the firing rates of the neurons.It is possible that the zeroth order rate approximation, ν h , would be sufficient to describe the data, so we compare the empirical rates to both ν h and ṅh approx .As in the mean field approximation test, we focused on a strongly coupled network with J 0 = 0.25, 0.5, 0.75, and 1.0.In the SI we analytically estimate the error, predicting it is small for both small and large fractions of recorded neurons and largest error when N rec ∼ N hid , so we check both N rec = 100 neurons out of N = 1000 neurons (f = 0.1) in Fig. 11 and N rec = 500 neurons out of N = 1000 (f = 0.5) in Fig. 12.
For each value of J 0 , we present two plots: the empirical rates versus the mean field rates ν h in the absence of recorded neurons (the zeroth order approximation; Figs.11 and 12, top row), and the empirical rates versus the linear approximation ṅh approx (the first order approximation; Figs.11 and 12, bottom row).We find that in both cases the data is centered around the identity line, but the spread of data grows with J 0 for the zeroth order approximation, while it is quite tight for the first order approximation up to J 0 = 1.0, validating our neglect of the higher order spike filtering terms.We also confirm that N rec = 500 offers worse agreement than N rec = 100, though the agreement between ṅh emp and ṅh approx is still not too bad.

Full mean-field reference state
For most of our analyses, we have been expanding the conditional firing rates of the hidden neurons around a reference state of zero activity of the recorded neurons.The quantities ν h , γ h , Γh,h (ω), and so on, are thus calculated using a network in which the recorded neurons have been removed.We have demonstrated Top row: scatter plot comparing ν h , the mean field firing rates of the hidden neurons in the absence of recorded neurons, to empirically estimated firing rates in simulations of the full network, for four different values of typical synaptic strength, J 0 = 0.25, 0.5, 0.75, and 1.0.The data lie along the identity line, demonstrating a strong correlation between ν h and the empirical data.However, the spread of data around the identity line indicates that deviations of the mean firing rates away from ν h , caused by coupling to the recorded neurons, is significant.Bottom row: Comparison of the first order approximation of the firing rates of hidden neurons, which accounts for the effects of recorded neurons, to the empirical rates.The data lie tightly along the identity with very little dispersion, demonstrating that higher order spike filtering is unnecessary even up to J 0 = 1.0, for N rec = 100.that this approximation is valid for the networks considered in this paper.However, this approximation may break down in networks in which the recorded neurons spike at high rates.In this case, we may need another reference state to expand the conditional rates around.A natural choice of reference state ṅ(0) r (t) in this case would be the mean firing rates of the neurons.We will set up this expansion here.
The mean firing rates of the neurons are intractable to calculate exactly, so we will estimate them by the mean field rates, an approximation that we expect to be accurate in the high-firing rate regime.
The mean field equations for the full network are ṅi = λ 0 φ We  Demonstrates validity of linear approximation (neglecting higher order spike filtering) up to J 0 = 1.0, for N rec = 500.The zeroth order approximation (top row) is quite poor, indicating the necessity of accounting for feedback from the recorded neurons.This first order approximation (bottom row) lies tightly along the identity line, indicating that even when the recorded and hidden populations are of comparable size, higher order spike filtering may not be significant.However, there appears to be some deviation for J 0 = 1.0, indicating that accounting for higher order spike filtering may be beneficial in this parameter regime.
We can then approximate the instantaneous firing rates of the recorded neurons by note that we introduced 0 = r ṅr − r ṅr so that we could write the instantaneous firing not as a function of filtered spike trains but as a function of filtered deviations from the mean firing rate.Importantly, although it looks like only the baseline is different from the zero-activity reference state case but the coupling is the same, the linear response function Γ full h,h (τ ) is not the same as the zero-reference state case, and hence the correction to the coupling is slightly different.The solutions look similar, but the linear response functions now incorporate the effects of the recorded units as well.In particular, Γ full ij (t − t ) satisfies the equation where γ full i is the gain of neuron i accounting for the entire network, Thus, in Fourier space Γfull ij (ω) = I − Vfull (ω) where V full i,j (ω) = γ full i Ĵi,j (ω) is an N × N matrix -i.e., it contains the couplings and firing rates of all neurons, recorded and hidden.Hence, while this looks formally similar to the result we obtained in the zero activity state, the inclusion of recorded neurons modifies our rules for calculating contributions to the effective coupling filters.In particular, Ĵeff r,r (ω) − Ĵr,r (ω) involves contributions from paths through both hidden and recorded neurons, unlike the zero-activity reference case, which involved contributions only from paths through hidden neurons.The reason for this, of course, is that the reference state depends on the entire network, not just the hidden neurons.The difference between the cases matters only at higher orders in our expansion -paths of length = 4 or greater.We can see this by writing out the first few terms in the path length expansion of the effective coupling, for conciseness, we have assumed zero-self coupling ( Ĵi,i (ω) = 0), but this can be restored by setting γ full i → γ full i /(1 − γ full i Ĵi,i (ω)).We see that the first few terms of the expansion are the same as the zero-activity reference case, with the exception that the γ full h are the gains for the entire network, not just the hidden network absent the recorded neurons.It is only the = 4 term at which contributions to the linear response functions involving paths through any neuron j, recorded or hidden, start to appear.Because we typically expect the amplitude of these terms to be small, we anticipate expanding around the mean field reference state will yield similar results to the expansion around the zero-activity reference state presented in the main paper.

Fig 1 .
Fig 1.The hidden unit problem. A. In a hypothetical circuit consisting of just two recorded neurons (no hidden neurons), we can measure the strength and time course of the directed interactions between neurons by measuring the response of the post-synaptic neuron's membrane potential to a spike from the pre-synaptic neuron.B. Realistically, there are many more neurons in the network that are unrecorded and hence "hidden."In this schematic, only two neurons are observed.The hidden neurons are driven by input from the presynaptic neuron labeled 1, and provide input to the recorded post-synaptic neuron labeled 2. Because the activity of the hidden neurons is not controlled, the membrane response reflects a combination of neuron 1's direct influence on neuron 2 and its indirect influence through the hidden network.C. The "effective" 2 neuron network observed experimentally.

Fig 2 .
Fig 2. Expansion of effective interactions into contributions from hidden paths.A. Graphical representation of Eq. (2).The linear response of the hidden network, Γh,h (ω), has been expanded as a series (corresponding to the grey hidden nodes and links between them), such that each term in the overall series can be interpreted as a contribution from a path through which the pre-synaptic neuron r is able to send a signal to post-synaptic neuron r via 1, 2, etc. hidden neurons.This expression holds for any pair of neurons in the recorded subset.B. Quantitative expressions for each diagram in the series can be read off by assigning the shown factors for each hidden neuron node and each link between neurons, recorded or hidden, and multiplying them together.(No factor is assigned to the recorded neuron nodes).γ h is the gain of neuron h and Ĵi,j (ω) is the true interaction from j to i in the frequency domain.

Fig 4 .
Fig 4.  Different complete circuits may underly similar effective circuits.A: A circuit very similar to that in Fig.3, except that neuron 1 also provides excitatory input to neuron 4, which in turn provides inhibitory input to neuron 3. The self-history coupling of neuron 3 to itself has also been removed in this example.B: Leftmost, the effective interaction from neuron 1 to 2, which is qualitatively and quantitatively similar to the effective interaction shown in Fig.3.Subsequent plots indicate each path through the circuit that neuron 1 can send a signal to neuron 2 through the hidden neurons 3 and 4. C. Leftmost, the effective interaction from neuron 1 to 2. Subsequent plots decompose this interaction into contributions from the paths shown above in B.

5 N
Fig 5.  Relative changes in interaction strength due to hidden neurons for three network types.We quantify relative changes in interaction strength between effective (J eff r,r ) and true (J r,r ) interactions by the (sample) root-square-mean deviation, σ[J eff r,r − J r,r ], normalized by the true synaptic weight (sample) standard deviation σ[J r,r ].We do so for three (sparse) network types: Left.An Erdős-Réyni (ER) network with "mixed synapses" (i.e., Dale's law not imposed) with normally distributed synaptic weights.Middle.An ER network with Dale's law imposed, (i.e., each neuron's outgoing synaptic weights all have the same sign).Right.A Watts-Strogatz (WS) small world network with 30% rewired connections and mixed synapses.All network types yield qualitatively similar results.In each plot solid lines are numerical estimates of the sample standard deviation of the difference between effective coupling weights J eff r,r and true coupling weights J r,r between neurons r = r , normalized by the standard deviation of J r,r .These estimates account for all paths through hidden neurons.Purple lines correspond to synaptic weights with standard deviation J 0 / √ pN (strong coupling), while grey lines correspond to synaptic weights with standard deviation J 0 /pN (weak coupling).For weak 1/N coupling (grey), the ratio of standard deviations is O(1/ √ N ).For strong 1/ √ N coupling (purple) the ratio is O(1) and grows in strength as the fraction of recorded neurons N rec /N decreases or the typical synaptic strength J 0 increases.The dashed black lines in the left plot show theoretical estimates accounting only for hidden paths of length-3 connecting recorded neurons (Eq.(4).Deviations from the length-3 prediction at small f and large J 0 indicate that contributions from circuit paths involving many hidden neurons are significant in these regimes.

3 Fig 6 .
Fig 6.Effective interactions between recorded neurons differ qualitatively from true interactions.Effective interactions J eff r,r (t) (solid purple) versus true coupling filters (dashed black) for N rec = 3 recorded neurons in a network of N = 1000 total neurons.Inset labels i ← j indicate the interaction is from neuron j to i, for i, j ∈ {1, 2, 3}.The simulated network has an Erdős-Réyni connectivity with sparsity p = 0.2 and normally distributed non-zero weights with zero mean and standard deviation 1/ √ pN .Although the network is sparse, the effective interactions are not: non-zero effective interactions develop where no direct connection exists.The effective interactions can differ qualitatively from the true interactions, as evidenced by the biphasic 3 ← 2 effective interaction, whereas the true 3 ← 2 is purely excitatory.

Fig 8 .
Fig 8. Same as Fig. 5B in the main text, but for a sigmoidal nonlinearity φ(x) = 2/(1 + e −x ).Because the sigmoid is bounded the mean field solution cannot diverge, yielding better results.

Fig 9 .
Fig 9. Same as Fig. 5, but for N = 100 neurons and N rec = {1, 11, 21, 31, 41, 51, 61, 71, 81, 91, 99} recorded neurons.Because we plot the relative deviations of the coupling strength against the fraction of observed neurons, the curves for the strongly coupled case are the same as for N = 1000, as expected, while the weakly coupled case yields stronger deviations.

Fig 10 .
Fig 10.Empirical estimates of average neuron firing rates from simulations plotted against mean firing rates predicted by mean field theory.The fact that the data lies along the identity line demonstrates validity of the mean field theory approximation up to J 0 = 1.0.
Fig 11.Top row: scatter plot comparing ν h , the mean field firing rates of the hidden neurons in the absence of recorded neurons, to empirically estimated firing rates in simulations of the full network, for four different values of typical synaptic strength, J 0 = 0.25, 0.5, 0.75, and 1.0.The data lie along the identity line, demonstrating a strong correlation between ν h and the empirical data.However, the spread of data around the identity line indicates that deviations of the mean firing rates away from ν h , caused by coupling to the recorded neurons, is significant.Bottom row: Comparison of the first order approximation of the firing rates of hidden neurons, which accounts for the effects of recorded neurons, to the empirical rates.The data lie tightly along the identity with very little dispersion, demonstrating that higher order spike filtering is unnecessary even up to J 0 = 1.0, for N rec = 100.

Fig 12 .
Fig 12.  Same as Fig.11but for N rec = 500 recorded neurons out of a total of N = 1000.Demonstrates validity of linear approximation (neglecting higher order spike filtering) up to J 0 = 1.0, for N rec = 500.The zeroth order approximation (top row) is quite poor, indicating the necessity of accounting for feedback from the recorded neurons.This first order approximation (bottom row) lies tightly along the identity line, indicating that even when the recorded and hidden populations are of comparable size, higher order spike filtering may not be significant.However, there appears to be some deviation for J 0 = 1.0, indicating that accounting for higher order spike filtering may be beneficial in this parameter regime.

Table 4 .
Network activity simulation parameter values.