Skip to main content

Command Palette

Search for a command to run...

๐Ÿง  Just Wrapped Up Neuromatch Computational Neuroscience Course โ€” Explored Latency in IBL Data!

Updated
โ€ข3 min read

๐Ÿ“œ 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

MetricDescription
OnsetFirst time the neuron exceeds a threshold after stimulus
PeakTime of maximum response
Half-maxTime when response reaches 50% of peak
CentroidCenter of mass of response curve
First SpikeFirst non-zero response bin
PopulationPeak 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.


Dataset: IBL Dataset

Course: Neuromatch Academy - Computational Neuroscience

Certificate: My Computational Neuroscience Certificate

More from this blog

Misc-Projects

7 posts