Generalisation to unseen topologies: Towards control of biological neural network activity

Laurens Engwegen, Daan Brinks, Wendelin Böhmer

TL;DR

This paper introduces a new reinforcement learning (RL) framework for controlling activity in biological neural networks with unknown, "black-box" connectivity. By using a Transformer-based architecture, the researchers developed an agent capable of inferring hidden relationships between neurons from activity alone, allowing it to generalize control to entirely new network topologies it never saw during training.

What Problem Does This Paper Address?

Controlling biological neural networks (BNNs) is a "holy grail" for treating neurological disorders like Parkinson’s or epilepsy. However, two massive hurdles stand in the way:

  1. Partial Observability: While we can record the electrical "spikes" of neurons (using techniques like voltage imaging), we cannot directly see the physical synapses (edges) connecting them. The network's structure is a hidden variable.
  2. Generalization: Every biological sample is unique. A controller trained to manage one specific network of neurons won't necessarily work on another because the underlying "wiring diagram" is different.

Current RL methods often require exhaustive training on a single network, making them impractical for real-world medical or research applications where a controller must work "out of the box" on a new patient or tissue sample.

Figure 1: Voltage image of neurons grown in vitro. When the field of view and number of neurons increases, it quickly becomes infeasible to study neuronal dynamics in detail.

Methods

The authors tackle this by framing the problem as a Contextual Partially Observable Markov Decision Process (CPOMDP).

The Environment

They built a procedural environment that generates "small-world" neuronal networks. These networks use a biophysical Leaky Integrate-and-Fire (LIF) model with synaptic depression to simulate realistic activity propagation. The agent's goal is to stimulate specific neurons to force a "target neuron" to follow a desired spiking pattern.

The Architecture: TDRQN

The core innovation is the Transformer-based Deep Recurrent Q-Network (TDRQN).

  • Local Memory: Each neuron in the network is assigned its own LSTM to track its individual history of activity and stimulation.
  • Self-Attention: A Transformer encoder then looks at all these individual neuron histories simultaneously. The self-attention mechanism allows the agent to "infer" which neurons are influencing others, effectively reconstructing a functional map of the hidden topology.
  • Permutation Equivariance: Because it uses attention, the agent doesn't care about the arbitrary "order" or "ID" of the neurons—it only cares about their relational dynamics.
Figure 2: The architectures with which we experiment. Different RNNs (in TDRQN, DDRQN and DMDRQN) share the same parameters, but keep track of different hidden states. FF blocks placed below each other correspond to layers with the same parameters, but applied to different inputs. The concatenation operation is indicated with ⊕. The components of the (baseline) architectures that are schematically visualised on the right correspond to those in TDRQN with the same colour.

Datasets

The study uses a custom-built procedural benchmark:

  • Training Set: 100 unique network topologies.
  • Test Set: 100 entirely different, unseen topologies.
  • Scale: Experiments were conducted on networks of 8 neurons, where the agent must control one target neuron by stimulating any of the other seven.

Key Insights and Ideas

  • Relational Inference is Essential: Standard RL agents (like DRQN) try to memorize the state of the entire system. When the topology changes, they fail. TDRQN succeeds because it learns how neurons relate to each other generally, rather than memorizing one specific map.
  • Permutation Equivariance is the Secret Sauce: By treating neurons as a set of objects rather than a fixed vector, the agent becomes robust to the structural variability inherent in biology.
  • Attention as a Graph Discovery Tool: The self-attention mechanism acts as a proxy for discovering the hidden graph structure. It learns to "attend" to the specific excitatory or inhibitory neighbors that are most relevant to the control task.

Key Results

  • Superior Generalization: TDRQN achieved a return of approximately 0.85 on unseen test networks. In contrast, the baseline DRQN overfitted heavily to the training set and performed poorly on the test set.
  • Failure of Simple Mixing: Architectures that simply concatenated neuron data (DMDRQN) also overfitted, proving that the specific "mixing" logic of the Transformer is crucial for generalization.
  • High Sample Efficiency: The TDRQN agent reached peak generalization performance with as few as 40 training contexts, suggesting it could be trained on a relatively small number of biological samples and still work on new ones.

Limitations and Future Work

While promising, the study has notable limitations:

  • Scale: The current experiments were limited to small networks (n=8). Scaling to hundreds or thousands of neurons will face the quadratic complexity of standard self-attention.
  • Simplification: The simulation assumes all neurons are observable and ignores environmental noise or "photobleaching" (signal decay) common in real imaging.
  • Future Directions: The authors suggest exploring more efficient architectures (like Retentive Networks) to handle larger scales and introducing stochasticity and noise to better mirror the messy reality of biological tissue.

Summary updated

Abstract

Novel imaging and neurostimulation techniques open doors for advancements in closed-loop control of activity in biological neural networks. This would allow for applications in the investigation of activity propagation, and for diagnosis and treatment of pathological behaviour. Due to the partially observable characteristics of activity propagation, through networks in which edges can not be observed, and the dynamic nature of neuronal systems, there is a need for adaptive, generalisable control. In this paper, we introduce an environment that procedurally generates neuronal networks with different topologies to investigate this generalisation problem. Additionally, an existing transformer-based architecture is adjusted to evaluate the generalisation performance of a deep RL agent in the presented partially observable environment. The agent demonstrates the capability to generalise control from a limited number of training networks to unseen test networks.
BibTeX
@misc{engwegen2024generalisation,
  author = {Laurens Engwegen and Daan Brinks and Wendelin Böhmer},
  title = {{Generalisation to unseen topologies: Towards control of biological neural network activity}},
  year = {2024},
  eprint = {2407.12789},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.12789},
}
Figure