TL;DR
This paper reverse-engineers how Recurrent Neural Networks (RNNs) solve a complex hierarchical inference task, finding that they learn near-optimal strategies similar to ideal Bayesian agents. The researchers developed a novel method, Representation and Dynamics Distillation (RADD), to distill these RNNs into low-dimensional, interpretable models, offering a new tool for understanding complex neural dynamics.
What Problem Does This Paper Address?
Understanding how the brain makes decisions is a fundamental challenge in neuroscience. While recurrent neural networks (RNNs) are increasingly used as models of neural computation, it's often difficult to interpret how they arrive at their solutions, especially for complex tasks. This paper tackles this interpretability challenge by investigating how RNNs solve a specific hierarchical inference task designed to mimic aspects of mammalian decision-making. This task requires inferring two hidden variables (stimulus side and block side) that evolve on different timescales, a complexity that mirrors real-world scenarios and the challenges faced by biological systems. The goal is to bridge the gap between the computational power of RNNs and our understanding of the underlying neural mechanisms.
Methods
The researchers trained RNNs to perform a perceptual decision-making and change-point detection task, mirroring a task used by the International Brain Laboratory (IBL). Here's a breakdown of their approach:
- Task Implementation: The IBL task involves a mouse (or RNN) observing stimuli in its visual field and indicating its choice. The difficulty lies in inferring not only the stimulus but also a "block side" that dictates the probability of stimulus presentation over a series of trials. This block side changes unpredictably, requiring change-point detection.
- RNN Architecture and Training: Standard RNNs with 50 hidden units were trained using cross-entropy loss and stochastic gradient descent.
- Normative Bayesian Baselines: To benchmark the RNN's performance, the authors implemented two ideal Bayesian agents:
- Bayesian Actor: Assumes perfect knowledge of the task and acts optimally.
- Bayesian Observer: Also assumes perfect knowledge but relies on the RNN to determine when to act, providing a measure of how well the RNN could perform if it knew when to stop integrating evidence.
- Representation and Dynamics Distillation (RADD): This is a novel technique proposed by the authors. It's a form of knowledge distillation where a small RNN (with a reduced number of units) is trained to reproduce the hidden states and dynamics of the larger, original RNN. This differs from traditional distillation, which typically focuses on output probabilities. RADD aims to create a low-dimensional, interpretable model that captures the essence of the original RNN's internal computations.
Datasets
The study uses a simulated dataset generated by the IBL task implementation. This task is described in detail in the paper and involves generating trials with varying stimulus contrasts, block structures, and feedback signals. No new benchmark datasets were introduced.
Key Insights and Ideas
- RNNs as Near-Optimal Bayesian Agents: The RNNs learned to perform the hierarchical inference task with accuracy remarkably close to ideal Bayesian baselines, demonstrating their capacity for complex probabilistic reasoning.
- Two-Dimensional Inference Subspace: The RNNs appear to represent their beliefs about the two latent variables (stimulus and block side) within a low-dimensional, specifically two-dimensional, subspace of their hidden states. This suggests a structured internal representation.
- Induced Coupling in Dynamics: The geometry of the RNN's internal dynamics reveals an "induced coupling" between the inference processes for the stimulus and the block side. This means the two inference processes aren't entirely independent within the RNN, which is a key aspect of hierarchical inference.
- RADD for Interpretability: The development of RADD is a significant contribution. By distilling the complex dynamics of a large RNN into a much smaller, interpretable model, it offers a powerful tool for understanding the internal workings of neural networks and, by extension, potentially biological neural circuits.
Key Results
- Performance: The RNN achieved performance nearly matching the Bayesian observer in terms of accuracy across different stimulus strengths.
- Chronometric Curves: RNNs showed slightly suboptimal integration times compared to the Bayesian actor, acting faster on low-contrast trials, which partially explains their slightly lower performance.
- Block Prior Leverage: The RNN effectively leveraged the block prior information, showing rapid improvement in performance after block change-points, similar to the Bayesian observer.
- Representation: Principal Component Analysis (PCA) of RNN activity revealed that the first two principal components captured 88.74% of the variance, indicating a low-dimensional solution. A logistic classifier could predict the block side from RNN activity with 82.6% accuracy using this 2D PCA plane.
- RADD Effectiveness: A 2-unit distilled RNN (using RADD) successfully emulated the dynamics of the original RNN and could even slightly outperform it on the task, demonstrating the power of this compression technique. This distilled RNN also showed sensible parameters corresponding to stimulus and block beliefs.
Limitations and Future Work
- Suboptimal Integration: The paper notes that the RNN's chronometric curves suggest a slightly suboptimal integration of within-trial evidence compared to the Bayesian actor, particularly on low-contrast trials.
- Feedback Weighting: The RNN appears to give surprisingly little weight to feedback signals, which the authors speculate might be due to the high accuracy of its actions or the complexity of integrating feedback.
- Future Directions: The authors express interest in exploring RADD in the context of reinforcement learning and using these models to guide further analysis of mouse neural data and circuitry. They also aim to better understand mouse behavior and neural representations by leveraging these RNN models.
Summary updated