Neural Models of Task Adaptation: A Tutorial on Spiking Networks for Executive Control

K. Ashwin Viswanathan 1 , Madhumitha Ganesan 2 · 2025

Read Neural Models of Task Adaptation: A Tutorial on Spiking Networks for Executive Control by K. Ashwin Viswanathan 1 , Madhumitha Ganesan 2 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-03784.txt.

Introduction

Ashwin Viswanathan Kannan and Madhumitha Ganesan wrote this tutorial in two thousand twenty-five, with author names in a fuller form in its text. It walks through the build of a spiking neural network that mimics how brains switch tasks.

The net uses leaky integrate-and-fire neurons in excitatory and inhibitory pools, with side inhibition and spike-timing plasticity that tunes the links on its own. Two real data sets serve as the tasks to switch between. The plan follows classic mind study designs, and tracks weight shifts and known effects such as long-term potentiation and depression. Switch pace is varied to see its toll on skill. The steps let others build and extend like models.

Catalog record

CREATORK. Ashwin Viswanathan 1 , Madhumitha Ganesan 2
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE24 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2503-03784

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Neural Models of Task Adaptation: A Tutorial on Spiking Networks for Executive Control K. Ashwin Viswanathan 1 , Madhumitha Ganesan 2 Abstract Understanding cognitive flexibility and task-switching mechanisms in neural systems requires biologically plausible computational models. This tutorial presents a step-by-step approach to constructing a spiking neural network (SNN) that simulates task-switching dynamics within the cognitive control network. The model incorporates biologically realistic features, including lateral inhibition, adaptive synaptic weights through unsupervised Spike Timing-Dependent Plasticity (STDP), and precise neuronal parameterization within physiologically relevant ranges. The SNN is implemented using Leaky Integrate-and-Fire (LIF) neurons, which represent excitatory (glutamatergic) and inhibitory (GABAergic) populations. We utilize two real-world datasets as tasks, demonstrating how the network learns and dynamically switches between them. Experimental design follows cognitive psychology paradigms to analyze neural adaptation, synaptic weight modifications, and emergent behaviors such as Long-Term Potentiation (LTP), Long-Term Depression (LTD), and Task-Set Reconfiguration (TSR). Through a series of structured experiments, this tutorial illustrates how variations in task-switching intervals affect performance and multitasking efficiency. The results align with empirically observed neuronal responses, offering insights into the computational underpinnings of executive function. By following this tutorial, researchers can develop and extend biologically inspired SNN models for studying cognitive processes and neural adaptation. I Introduction The ability to adapt and switch between tasks is a fundamental aspect of cognitive flexibility, shaping decision-making and behavioral efficiency in dynamic environments. Task-switching has been widely studied across disciplines such as psychology, cognitive neuroscience, and artificial intelligence [ 1 , 2 ] . While humans often shift between tasks seamlessly, performance variations arise depending on prior experience, task familiarity, and cognitive load. Understanding these processes requires computational models that can capture the underlying neural mechanisms driving adaptive control and decision-making. Empirical studies have identified increased neural activity in the cognitive control network, particularly in the prefrontal cortex (PFC), when engaging in task-switching [ 3 , 4 , 5 ] . These findings have influenced cognitive modeling frameworks, including Brain-Inspired Cognitive Architectures (BICA) [ 6 , 7 ] , which attempt to replicate executive function processes in artificial systems. However, many existing models focus on task-switching in highly controlled experimental conditions [ 3 ] , relying on cue-based paradigms or human subject trials [ 8 ] , limiting their applicability to real-world multitasking scenarios. This tutorial introduces a computational approach for simulating task-switching behavior using biologically plausible spiking neural networks (SNNs), a third-generation neural network model inspired by the brain’s action potential dynamics [ 9 ] . Unlike traditional artificial neural networks, SNNs encode information through temporally precise spikes, mimicking the natural firing patterns of neurons. Our implementation employs the Leaky Integrate-and-Fire (LIF) neuron model, which efficiently captures neuronal excitability and inhibition within cortical circuits. Synaptic plasticity is governed by Spike Timing-Dependent Plasticity (STDP), an unsupervised learning rule that adjusts synaptic weights based on the relative timing of pre- and post-synaptic spikes [ 10 ] . II Related Work Computational models inspired by cognitive neuroscience have advanced our ability to simulate task-switching mechanisms in biologically plausible frameworks. Foundational cognitive architectures such as SOAR [ 11 , 12 ] and ACT-R [ 13 ] have contributed to our understanding of decision-making processes, influencing early models of cognitive flexibility. Empirical studies further established the prefrontal cortex (PFC) as a key region in task-switching, with experiments such as the Wisconsin Card Sorting Test (WCST) demonstrating its role in adaptive behavior [ 14 , 15 , 16 ] . Spiking Neural Networks (SNNs) have emerged as a biologically realistic approach to modeling neural dynamics, particularly due to their ability to replicate synaptic plasticity mechanisms such as Spike Timing-Dependent Plasticity (STDP) [ 10 , 17 ] . Prior studies have successfully applied SNNs to pattern recognition and classification tasks [ 18 ] and have modeled sensory processing systems like the mammalian olfactory system [ 19 ] . These findings establish a computational foundation for implementing task-switching models with biologically grounded learning dynamics. Our work extends these studies by developing a two-layered SNN model that processes real-world stimuli, rather than relying on traditional cue-based switching paradigms. Inspired by task-switching cost experiments [ 8 ] , we investigate how switching intervals impact neural adaptation and performance, providing insights into how networks reconfigure in response to new tasks. By leveraging SNNs with STDP-based learning, we demonstrate how biologically plausible mechanisms can encode dynamic task transitions, supporting the study of cognitive flexibility in more realistic, data-driven contexts. III Neuron Model and Architecture The neural architecture implemented in this study is designed to replicate biologically plausible task-switching dynamics. The network consists of two primary layers: an excitatory layer responsible for processing incoming stimuli and an inhibitory layer that regulates neuronal activity. This layered approach mirrors cortical interactions where excitatory neurons drive information processing while inhibitory neurons modulate signal flow to prevent excessive activation. The model is built using the BRIAN2 simulator [ 20 ] in Python. To achieve realistic neuronal behavior, the dynamics of each neuron are governed by the leaky integrate-and-fire (LIF) model, a well-established computational framework for simulating spike-based neural activity [ 21 ] . This model provides an effective approximation of how neurons integrate synaptic inputs and generate action potentials. III-A Leaky Integrate-and-Fire Model The LIF neuron is mathematically modeled based on the properties of an electrical circuit comprising a capacitor ( C ) in parallel with a resistor ( R ). The neuron receives input in the form of a synaptic current I(t) , which is distributed across the resistive and capacitive components: I(t)=I_{R}+I_{C} (1) where I_{R} represents the resistive current and I_{C} the capacitive current. The capacitive current is given by: I_{C}=C\frac{dV}{dt} (2) Substituting this into Equation ( 1 ) and applying Ohm’s law ( I_{R}=\frac{V-V_{rest}}{R} ), we derive the membrane voltage equation: \tau_{m}\frac{dV}{dt}=-(V-V_{rest})+RI(t) (3) where \tau_{m}=RC is the membrane time constant, V is the membrane potential, and V_{rest} is the resting potential. This equation determines how a neuron accumulates charge over time in response to synaptic inputs. III-B Spike Generation and Refractory Mechanism Neurons emit spikes when their membrane potential exceeds a predefined threshold V_{th} . This event triggers an action potential, after which the neuron resets to its resting potential and enters a refractory period. This behavior can be formalized as: V_{i}(t)=\begin{cases}V_{reset},&\text{if }V_{i}(t)>V_{th}\\ V_{i}(t),&\text{otherwise}\end{cases} (4) where V_{reset} represents the potential immediately after a spike, ensuring the neuron is ready to integrate new inputs. III-C Encoding Input as Spike Trains Unlike conventional artificial neural networks, which process continuous-valued inputs, spiking neural networks rely on discrete events known as spikes. In this implementation, input values are transformed into spike trains using rate-based encoding. The likelihood of a spike occurring follows a Poisson distribution: P(spike|\lambda)=\lambda e^{-\lambda} (5) where \lambda is the mean firing rate proportional to the input magnitude. This stochastic encoding method captures biological variability, making the network robust to noise and irregular spike timing. TABLE I: Spiking Neuron Model Parameters Parameter Value Threshold voltage ( V_{th} ) -60 mV Resting potential ( V_{rest} ) -70 mV Refractory period 10 ms Membrane time constant ( \tau_{m} ) 750 ms IV Spiking Neural Network Framework The spiking neural network (SNN) developed in this work is designed to model task-switching behavior by mimicking cortical processing dynamics. The architecture consists of two primary components:

Read the complete text