Abstract
Traditional encoding models in neuroscience, primarily Generalized Linear Models (GLMs), often struggle to capture the complex, nonlinear relationships inherent in neural spiking data. This study evaluates modern machine learning (ML) architectures—specifically feedforward neural networks, gradient-boosted trees (XGBoost), and stacked ensembles—as benchmarks for neural response prediction. Across datasets from the macaque motor cortex, somatosensory cortex, and rat hippocampus, ML models consistently outperformed GLMs. These results suggest that modern ML can serve as a "performance ceiling," helping researchers identify when traditional models fail to capture available information due to structural simplicity rather than inherent data noise.
Introduction
A central challenge in systems neuroscience is the development of encoding models that accurately predict a neuron's spiking activity from external variables. For decades, the Poisson Generalized Linear Model (GLM) has been the standard due to its mathematical tractability and interpretability. However, GLMs assume a linear relationship between inputs and the log-firing rate, potentially overlooking intricate feature interactions. Without a high-performance benchmark, it is difficult to determine if a model's poor fit stems from stochastic noise or model misspecification. This work proposes using modern ML techniques to establish a predictive "gold standard" for neural encoding.
Methods
The researchers compared the predictive accuracy of traditional Poisson GLMs against three ML approaches:
- Feedforward Neural Networks (NN): Multi-layer perceptrons capable of learning nonlinear mappings.
- Gradient Boosted Trees (XGBoost): An ensemble method using decision trees to iteratively correct prediction errors.
- Stacked Ensembles: A meta-model combining predictions from GLM, NN, and XGBoost.
Models were evaluated using the Poisson pseudo-$R^2$ metric across three electrophysiological datasets: macaque motor cortex (M1), macaque somatosensory cortex (S1), and rat hippocampal CA1 (place cells).
Results
Superior Predictive Power
In nearly all conditions, ML models—particularly XGBoost and the Ensemble—surpassed the GLM. In the macaque M1 dataset, the ensemble's predictive power was approximately double that of the GLM when using full feature sets.
Robustness to Feature Engineering
A significant advantage of ML models is their ability to handle raw, non-linear inputs. While GLMs require manual feature engineering (e.g., transforming angles into sine and cosine components), XGBoost maintains high performance even with discontinuous raw inputs like radians.
Performance in Sparse Data
In the rat hippocampus, where firing rates are low and data is sparse, XGBoost proved more robust than Neural Networks. Many neurons that appeared unpredictable to a GLM were found to be highly predictable by XGBoost, indicating that traditional models fundamentally mischaracterized the spatial encoding of these cells.
Discussion
While ML models offer superior accuracy, they present a trade-off in interpretability compared to the "tuning curves" provided by GLMs. However, their role as a diagnostic tool is invaluable. A significant performance gap between a GLM and an ML model serves as a "smoking gun" for hidden nonlinearities. Future research should integrate post-hoc interpretability tools to extract biological insights from these high-performing "black box" models, potentially leading to more sophisticated and accurate theories of neural computation.
Summary updated