  Generalized linear models are one of the most efficient paradigms for
predicting the correlated stochastic activity of neuronal networks in response
to external stimuli, with applications in many brain areas. However, when
dealing with complex stimuli, the inferred coupling parameters often do not
generalize across different stimulus statistics, leading to degraded
performance and blowup instabilities. Here, we develop a two-step inference
strategy that allows us to train robust generalized linear models of
interacting neurons, by explicitly separating the effects of correlations in
the stimulus from network interactions in each training step. Applying this
approach to the responses of retinal ganglion cells to complex visual stimuli,
we show that, compared to classical methods, the models trained in this way
exhibit improved performance, are more stable, yield robust interaction
networks, and generalize well across complex visual statistics. The method can
be extended to deep convolutional neural networks, leading to models with high
predictive accuracy for both the neuron firing rates and their correlations.
