Beyond the Paper: A Conversation with Michał Lange
Interviewed by Dr. Paige N. McKeon, August 3, 2025
Calcium imaging is a powerful tool for understanding behavior and neurological disorders. But it can be difficult for researchers without advanced programming skills to analyze the complex, large-scale neural data collected from this technique. Furthermore, existing analytical tools cannot reliably identify calcium transients from neurons while integrating multiple data streams. To improve on these limitations, Lange and colleagues developed a new tool called CalTrig.
CalTrig combines calcium imaging analysis with machine learning to enable data processing from a wide range of research applications. Notably, the researchers evaluated four different machine learning models to identify the optimal one for calcium transient detection across different training sessions, animal models, and brain regions. Lange et al. hope this tool will allow for deeper exploration and advancements in neuroscience due to its demonstrated reliability, flexibility, and accessibility.
“I got a firsthand look at the intricacies and challenges of neuroscience research — and realized how fascinating the work is, especially when approached through the lens of an AI researcher and data scientist.”
Michał Lange
What led you to your current position?
I initially pursued a career in the gaming industry. However, toward the end of my video game development degree, I developed a keen interest in understanding and applying artificial intelligence (AI) techniques to a variety of problems. I vividly remember watching a YouTube video where someone developed a fully functional AI that learned to complete a level in Super Mario better than any human could—using the NeuroEvolution of Augmenting Topologies (NEAT) algorithm. It used just a basic representation of the level and a simple goal: go as far right as possible. Somehow, the algorithm was able to map these simple inputs into complex behavior, and that left me deeply motivated to find out how this was even possible. After completing my bachelor's, I went on to do an MSc in Artificial Intelligence at the University of Edinburgh, and then I accepted a PhD position at Indiana University–Purdue University Indianapolis (IUPUI).
My run-in with neuroscience was more of a happy coincidence than a planned move into the field. In my first year as a PhD student, I had the opportunity to collaborate with Dr. Yao-Ying Ma and her lab in the Department of Toxicology and Pharmacology at IUSM. The goal was to develop a new method for identifying neurons from calcium imaging videos and their corresponding calcium traces. In the brief time we worked together, I got a firsthand look at the intricacies and challenges of neuroscience research—and realized how fascinating the work is, especially when approached through the lens of an AI researcher and data scientist. Just as importantly, I found the lab’s open and collaborative atmosphere extremely conducive to both the research I was doing and my growth as a researcher. Wanting to continue my involvement with the lab, I made the decision to end my PhD early, which opened the door for me to join the lab full-time as a research analyst.
What are your career goals? Do you have advice for anyone pursuing a similar path?
Currently, after three years of collaboration with Dr. Ma’s lab, I’ve decided to return to my home country of Poland to be closer to my friends and loved ones. At the moment, I primarily spend my time on projects in the commercial sector, but I still allocate time during the week toward our post-CalTrig project and general support for the lab in utilizing CalTrig. Due to the level of research funding in Poland, my career will most likely continue along the commercial trajectory. However, I plan to maintain my current level of contribution to Dr. Ma’s lab and keep a pulse on contemporary neuroscience research.
As for advice for someone looking to pursue a career in research — I’d strongly encourage them not to be dissuaded by the often challenging and sometimes seemingly unfair process of getting involved with a research group. I’ve seen plenty of great candidates not make the cut due to extraneous factors — research direction, competition, grant budgets, etc. While I do attribute a good amount of luck to my own trajectory, there were a few things that made a difference: most notably, getting involved with research early during my undergraduate degree and having a paper published before I graduated was a big advantage.
That said, one thing I don’t think gets emphasized enough is building rapport with the lab you're interested in. Beyond academic credentials, the lab lead wants to get a sense of your enthusiasm for the work and whether you’d be a good fit for the lab’s culture and working style. If possible, I’d encourage anyone to try and set up an informal chat with the lab lead to establish that connection. If the meeting goes well, your personality and motivation will be associated with your application—and that can really tip the scales in your favor.
“One thing I don’t think gets emphasized enough is building rapport with the lab you're interested in. Beyond academic credentials, the lab lead wants to get a sense of your enthusiasm for the work and whether you’d be a good fit for the lab’s culture and working style.”
Can you tell us a little about what motivated you to develop CalTrig and what the process was like?
Initially, I did not expect the project to turn into a research paper or become such an instrumental part of our lab’s processing pipeline. When I first joined the lab, we were using an open-source calcium extraction tool called Minian, which used the constrained non-negative matrix factorization (CNMF) method to disambiguate cell positions and their corresponding calcium traces from the original calcium videos. Although Minian was a significant step forward in the field of open-source calcium extraction tools and helped streamline the process, it still required considerable algorithmic and programmatic knowledge to fully understand and operate the pipeline.
The data scientists in our lab (including myself) were tasked with processing videos using Minian to extract the signals. Once the signals were extracted, it was up to the biologists in the lab to assess the quality of the extraction. However, due to the way Minian compartmentalized outputs into different sections of the pipeline—and the limitations of running it within Jupyter notebooks—it was difficult to get a general overview of the output and reliably assess the overall quality of the extracted signals.
I saw an opportunity to create a single interface that would abstract away the programmatic aspects of interacting with the data and provide our team with a holistic view of any relevant information that could help them evaluate signal quality.
Initially, I thought this would end up being a small side project. But even in its early stages, the potential of CalTrig quickly became apparent, and the lab started providing ideas for features to include:
- “Since we’re assessing the quality of detected cells, why not implement a convenient way to accept or reject them?”
- “Wouldn’t it be helpful if all observed signals could be synced in real time?”
- “If we suspect a cell was missed, can we have a feature to manually draw out the region of interest (ROI) and observe the resulting signal?”
- “Wouldn’t it be convenient if we could manually confirm whether a cell fired?”
As these kinds of questions and feature requests came in, I started to see the real potential of what I was building, and I became very motivated to make CalTrig as feature-complete as possible.
The real turning point came when I implemented a module to manually and algorithmically label whether a cell fires. I realized that even my automatic method of detection was imperfect and still required some manual correction by the user. That’s when I came up with the idea to use the labeled data we already had and train a machine learning model to fully automate the process. At that point, I knew this project would become a paper.
“Initially, I thought this would end up being a small side project. But even in its early stages, the potential of CalTrig quickly became apparent, and the lab started providing ideas for features to include […] As these kinds of questions and feature requests came in, I started to see the real potential of what I was building, and I became very motivated to make CalTrig as feature-complete as possible.”
What was your approach in developing this tool and testing datasets on it?
Thanks to my degree in Games Development and AI, I felt I had the necessary prerequisites to take on the project of developing this tool. I did have a dedicated dataset that I used to test various new features of CalTrig. However, due to the dynamic nature of how our lab operates — with new data being made available on a weekly basis — much of the development ended up being trial and error. On the upside, my growing familiarity with the kinds of data this tool would need to handle allowed me to better prepare for potential edge cases. There's always the possibility of something unexpected appearing, but the diversity of data that has already been processed with CalTrig has left me fairly confident in its reliability.
For the machine learning component, we had by that point collected a diverse training dataset spanning different sessions and mice — so in that case, a specific dedicated dataset was used.
Can you tell us a little about what hurdles you faced while developing CalTrig, and how you overcame them?
The first major hurdle came from the fact that I came from a pure AI/Computer Science background and had limited biological knowledge, so there was quite a bit of catching up I had to do in that department. Thankfully, lab lead Dr. Ma was extremely patient in explaining all the biological concepts to me. This was especially important to me, as I felt that understanding the biological perspective would be paramount to creating a tool that would actually be used by biologists.
Secondly, there is a litany of open-source tools available for a variety of tasks, and it can be difficult to assess which one will be the best for a particular use case—so a lot of trial and error was involved. Furthermore, this was the first time I had to develop a graphical user interface (GUI) with real-time data visualization. Our datasets are significantly large, and I had to come up with solutions to efficiently stream the information to the user. I became quite self-conscious of suboptimal user experience—usually manifesting as the GUI hanging or hitching when loading the next big chunk of data—so I spent some time working on improvements. These mini-optimization projects ended up being very satisfying. I especially enjoyed coming up with a parallel pre-caching solution for all the signals, which allowed me to visualize them in real time without any noticeable hitching.
Other times I ran into problems that went contrary to my intuition when applying AI to a research task. A common issue in developing AI models is class imbalance — when your dataset has significantly more examples of one class than another. This was the case for cell firing, where firing events only made up about 3% of the entire signal. A model trained on this data as-is might become biased toward always predicting “non-firing.” To combat this, I preemptively applied a stratification approach so that the model would see roughly equal amounts of firing and non-firing examples. Interestingly, this made the model a bit too optimistic — it started classifying noise as firing events. The issue was that most of the non-firing parts of the signal were just quiet, and only a small percentage contained noise that could be mistaken for firing. I readjusted my training data to emphasize the difference between actual firing and noisy non-firing segments, which markedly improved the model’s performance.
One thing I wish I’d known ahead of time was the final scope of what the project would become. A bit of extra foresight would’ve saved me from having to refactor the code once or twice.
How was the review process with eNeuro?
First, the submission interface was well-structured and refreshingly flexible, especially in the early stages. eNeuro didn’t require us to strictly follow formatting guidelines for the initial submission, which made the process much easier to manage. We were able to focus on the content itself rather than formatting minutiae and only had to deal with the detailed requirements once the manuscript was accepted.
Second, our paper was reviewed by experts from both computational and neuroscience backgrounds, which gave us a well-rounded and fair evaluation. This kind of interdisciplinary review was especially valuable for our work on CalTrig, since the tool sits right at the intersection of algorithmic methods and neurobiological application. The feedback helped us confirm both the technical soundness of the tool and its usefulness within actual neuroscience workflows.
Third, the review timeline was clear and predictable, which helped us stay on track and keep the momentum going during the revision phase.
Lastly, one thing that stood out about eNeuro is that they don’t allow any supplementary materials — everything, including figures, tables, and methods, has to be in the main manuscript. While that did take a bit of extra work to reorganize and reformat, the end result was a cleaner and more self-contained paper. Since it’s an online journal, the presentation worked well, and we think it actually made the content easier to follow.
“Our paper was reviewed by experts from both computational and neuroscience backgrounds, which gave us a well-rounded and fair evaluation. This kind of interdisciplinary review was especially valuable for our work on CalTrig, since the tool sits right at the intersection of algorithmic methods and neurobiological application.”
What is your hope for how others may use this tool?
I hope other research groups can benefit from CalTrig the same way our lab has — as a tool to better understand calcium activity data and to potentially streamline their processing pipelines. My original goal with CalTrig was to help bridge the skill gap for biologists, so they could spend less time learning how to code and more time engaging with their data in a meaningful way.
As far as I know, our team at the CCI Ma Lab is currently the only group using the tool, but we’re hopeful that the recent publication—and maybe even this interview—will get more researchers interested in giving it a try.
Do you plan on using CalTrig for your future projects?
Yes! Our next project is essentially a direct sequel to CalTrig. The first completed version of CalTrig focused on integrating all CNMF output into one interface, with intuitive data visualization and automated transient labeling. Now that we have this prepared and labeled data, we’re exploring more advanced ways of representing the signals—specifically through 3D visualizations and pattern analysis of firing behavior across different cell groups.
Our early experiments have shown some promising results, particularly in how cell locations relate to their firing patterns. We’re now in the process of applying specific datasets to what we’re calling CalTrig 2.0, and hopefully not long after, we’ll begin drafting our next paper.
Keep up to date with Yao-Ying Ma’s lab.
Connect with Michał Lange on LinkedIn.
Read the full article:
CalTrig: A GUI-Based Machine Learning Approach for Decoding Neuronal Calcium Transients in Freely Moving Rodents
Michal A. Lange, Yingying Chen, Haoying Fu, Amith Korada, Changyong Guo, and Yao-Ying Ma
FOLLOW US
POPULAR POSTS
TAGS
CATEGORIES