๐ง Just Wrapped Up Neuromatch Computational Neuroscience Course โ Explored Latency in IBL Data!
๐ Introduction
I recently completed the Neuromatch Academy Computational Neuroscience course and got the chance to work with an amazing team, where we explored the Allen Brain Observatory data through the IBL ONE API and performed an in-depth analysis of neural latency across brain regions.
Coming from a machine learning background and being new to neuroscience, this was both super exciting and pretty challenging but thankfully, I had a great team who made the entire experience very welcoming and collaborative.
โณ My Contribution: Latency Analysis
While the whole project was a team effort, I worked specifically on the latency analysis part.
This involved:
Calculating multiple latency metrics per neuron, including onset, peak, half-peak, and first-spike latency
Visualizing these latencies across neurons and brain regions
Exploring how latency differences correlate with modulation and contrastive responses
Trying to understand if certain brain regions respond faster to specific stimuli or choices
In this blog, Iโll walk you through:
โ
What latency means in neural responses
โ
Custom latency analysis pipeline in Python
โ
The interesting patterns and findings
โฑ๏ธ What is Latency?
In neuroscience, latency measures how quickly neurons respond to a stimulus.
It helps answer questions like:
Do some brain regions respond faster than others?
Do neurons preferring different stimuli (left vs. right) respond at different times?
Are contrastive (discriminative) responses faster or slower than general ones?
Understanding these differences can reveal how information flows through the brain during decision-making.
๐งโ๐ป The Dataset
We used the International Brain Laboratory (IBL) open dataset:
Neuronal recordings from multiple brain regions
Mice performing decision-making tasks
Neurons labeled by left or right stimulus preference
โ๏ธ Analysis Pipeline
For the project I implemented a custom latency computation pipeline in Python.
Hereโs a summary of the metrics I computed:
1๏ธโฃ Latency Metrics per Neuron
| Metric | Description |
| Onset | First time the neuron exceeds a threshold after stimulus |
| Peak | Time of maximum response |
| Half-max | Time when response reaches 50% of peak |
| Centroid | Center of mass of response curve |
| First Spike | First non-zero response bin |
| Population | Peak latency of the population-averaged PSTH |
2๏ธโฃ Interactive Visualization
I built interactive dashboards with ipywidgets to explore:
Latency distributions across regions
Latency differences between left/right preferring neurons
Regions where contrastive responses are faster than modulated ones
Overlaps across different latency metrics
๐ Example Visualization
Hereโs an example of my findings from LGd region:
Latency Plots

๐ Observations
โ
Many neurons in LGd responded early โ within ~0.1s (modulated latency)
โ
Right-preferring neurons showed a delayed peak in contrastive latency (~0.5s)
โ
Faster-responding neurons were more strongly modulated
โโโ Spearman ฯ = โ0.38, p = 0.00896
These patterns suggest that the brain prioritizes quick and strong responses to visual stimuli โ even in early sensory regions like LGd.
๐ Key Findings
Some brain regions consistently respond faster to contrastive stimuli
Latency varies by region and by neuron preference
Peak latency negatively correlates with modulation strength
Certain visual regions (VISam, VISrl, VISp) show strong early contrastive responses
๐ Final Thoughts
Iโm still very new to neuroscience, and honestly, this project taught me so much, not just about the brain, but also about working with neurodata, collaborating on analyses, and asking the right questions.
Big thanks to my team for being so supportive and making me feel included despite my beginner status in this field. Couldnโt have done this without them!
This project was an amazing hands-on experience during Neuromatch Academy.
By combining the IBL dataset with my own latency analysis pipeline, I could explore rich temporal dynamics in the brain.
๐ Useful Links
Dataset: IBL Dataset
Course: Neuromatch Academy - Computational Neuroscience
Certificate: My Computational Neuroscience Certificate