Navnoor Singh Mahal’s Personal Reflection

At the beginning of this project, I underestimated how challenging medical imaging research would be. While I had some experience with machine learning, working with real-world medical data was very different from anything I had done before. One of the first things I struggled with was simply trying to match the performance of already published models. I initially expected that reproducing similar results would be straightforward, but I quickly realized that even small differences in data handling or setup can lead to noticeable gaps in performance.

Another major challenge I faced was related to the dataset itself. The ChestX-ray14 dataset is highly imbalanced, with far fewer pneumothorax cases compared to normal scans. Early on, I did not fully account for this, and I later discovered issues related to data leakage and improper balancing. This affected my results and made me go back and rethink how I was splitting and evaluating the data. Although frustrating, this was an important learning moment because it showed me how critical proper data handling is in machine learning, especially in medical applications.

I also found it difficult to consistently improve model performance across different training regimes. Reducing the number of positive samples significantly impacted the results, and there were times when long training runs did not lead to meaningful improvements. This was particularly discouraging, but it helped me better understand the limitations of supervised models under low-data conditions.

Working with the self-supervised approach was a turning point. While it required more effort to implement and understand, I found it interesting that it consistently performed better across different settings. This helped me see that improving performance is not just about increasing data, but also about learning better representations from the data itself.

One of the biggest takeaways from this experience is that research is rarely a smooth or linear process. There were multiple points where I had to go back, fix mistakes, and rethink my approach. I also realized the importance of staying organized when running multiple experiments, as it is very easy to lose track of results or repeat the same mistakes.

Overall, this project helped me connect technical concepts to real-world problems. Instead of focusing only on improving metrics, I began to think more about the clinical impact of the work, particularly how better detection of pneumothorax could help reduce missed diagnoses. This experience not only strengthened my technical skills but also gave me a better understanding of how machine learning can be applied in healthcare settings.

Abigail Chen’s Personal Reflection

Hi everyone! My name is Abigail Chen, and I am a third-year student specializing in Data Science at the University of Toronto. This year, I had the opportunity to work on a research project in medical imaging through Professor Tyrrell’s lab. Looking back, the most difficult part of the experience was not coding or running experiments, but learning how to find a research question that actually mattered.

When I first started, I was very new to machine learning and honestly felt completely lost. Many of the terms, models, and technical ideas I encountered were unfamiliar to me, so even understanding the background well enough to follow the field took significant time and effort. Very early on, I realized that research is not just about trying a method and seeing what happens. Professor Tyrrell emphasized that a research question should always answer the question, “Who cares?” In other words, it is not enough for an idea to sound technical or interesting. It has to matter scientifically or clinically.

That point became very real when I first came up with a few possible project ideas and some of them were rejected. Professor Tyrrell pointed out that previous studies had already reported very high accuracy, leaving limited room for meaningful improvement. He then asked a question that completely changed the way I thought about the project: if these methods already perform so well, why are they still not commonly used in practice? That question pushed me to think beyond surface-level performance and focus instead on the gap between promising results and real-world usefulness. He also emphasized that if I wanted to study retinal disease, I needed to understand retinal disease itself well and become genuinely knowledgeable about the application area, not only the machine learning side.

This process eventually led me to the research question that shaped my final paper: whether uncertainty-aware modelling could improve the reliability of retinal OCT disease classification under domain shift. To investigate this, I compared a standard ResNet18 softmax classifier with an Evidential Neural Network on both internal and external OCT datasets collected from different scanners and institutions. The study showed that although the baseline model achieved stronger internal accuracy, the uncertainty-aware model was substantially more stable across external datasets, with a much smaller internal-to-external performance drop. It also produced useful uncertainty estimates that supported more cautious decision-making, and after additional refinement with threshold tuning and selective prediction, the model achieved stronger retained-case external performance with lower false-negative and false-positive rates. These findings made the project feel especially meaningful to me, because they connected technical modelling choices to a practical clinical question: not only whether a model can make a prediction, but whether that prediction should actually be trusted.

Overall, this experience taught me that research begins long before the final experiment. It begins with learning the background, understanding the real problem, and asking a question that is specific, meaningful, and worth answering. I am very grateful to Professor Tyrrell for pushing me to think more critically about what makes research important, and this experience has given me a much deeper appreciation of how serious, demanding, and rewarding research can be.

MiWord of the Day Is… Uncertainty! 

Uncertainty. 

Not exactly a word people get excited about. 

It sounds hesitant. Awkward. Slightly unglamorous. People usually prefer words like accuracy, confidence, and performance. Those words sound strong. They look great in headlines and presentations. Uncertainty sounds like the word that arrived late, carrying too many questions. 

But honestly, uncertainty might be one of the most important ideas in science. 

Why? Because people are often too impressed by answers that look certain. 

If a method performs really well in the exact setting where it was designed, trained, and tested, everyone celebrates. And fair enough — strong performance matters. But the real world has a bad habit of refusing to stay the same. Environments shift. Conditions change. Data collected in one place may not look quite like data collected somewhere else. A system that seems brilliant in one setting can suddenly become much less reliable in another. 

That is where uncertainty becomes interesting. 

A good example comes from medical AI. Imagine a model that looks at retinal OCT scans — cross-sectional images of the eye — and tries to decide whether they look normal or show disease. At first, this sounds simple: train the model, test the model, report the score, done. But in real clinical use, things are messier. Different hospitals use different scanners. Images are collected in slightly different ways. Patient populations vary. So the model is no longer seeing exactly the same world it saw during development. 

Now here comes one useful academic term: Evidential Neural Network, or ENN. 

That sounds very official, but the basic idea is actually simple. A regular model usually gives you an answer. An ENN tries to do two things at once: give you an answer, and also give you a sense of how much evidence it has for that answer. In other words, it is not just saying, “Here is my prediction.” It is also saying, “Here is how strongly I believe my own prediction.” 

That difference matters a lot. 

Because in a clinical setting, a wrong answer is bad. But a wrong answer delivered with complete confidence can be worse. If a diseased scan is confidently labeled as normal, that can create false reassurance and delay care. In settings like that, uncertainty is not a flaw. It is a warning light. It is the model saying, “Be careful with this one.” 

That is why uncertainty should not be treated as weakness. 

It is not the opposite of intelligence. It is the part of intelligence that admits limits. It is what keeps a system from acting like it knows everything when it does not. And honestly, humans could probably use more of that too. 

So maybe uncertainty is not the enemy of knowledge. 

Maybe it is the part of knowledge that tells the truth. 

Now for the fun part, use uncertainty in a sentence by the end of the day: 

Serious: 
In clinical AI, uncertainty matters because it can signal when a prediction should be reviewed more carefully instead of being trusted automatically. 

Less serious: 
Uncertainty is the invisible editor that keeps rewriting my week without permission. 

See you in the blogosphere! 
Abigail Xi Chen 

MiWord of the Day Is… Class Imbalance

Let’s say you’re training a model to detect a disease from chest X-rays. You collect a dataset with 1000 image, but only 50 actually show the disease.

Now here’s the catch: if your model simply predicts “normal” for every image, it will still be 95% accurate.

So what’s going on here?

This is what we call class imbalance, when one category in your data appears far more often than another. In many real-world problems, especially in healthcare, the “important” cases (like a disease) are actually the rare ones.

The problem is that most machine learning models are designed to minimize overall error. So naturally, they focus on getting the majority class right. In this case, that means learning to predict “normal” very well, while quietly ignoring the minority class.

From a practical standpoint, this is a big issue. In medical settings, missing a positive case can have serious consequences. That’s why accuracy alone can be misleading. Metrics like sensitivity (how well the model detects positives) become much more important when dealing with imbalanced data.

There are a few ways to deal with this. You can try to rebalance the dataset by adding more minority examples or reducing the majority ones. You can also change how the model is trained so that it “cares more” about the rare cases. Another approach is to improve how the model learns patterns in general, so it can still recognize important signals even when examples are limited.

This idea shows up a lot in medical imaging. Most scans are normal, but the goal is to catch the abnormal ones, which makes class imbalance a core challenge rather than just a minor inconvenience.

Now using class imbalance in a sentence:

Serious example – “Because of class imbalance, the model achieved high accuracy but had poor sensitivity for detecting positive cases.”

Less serious – “Our group project has serious class imbalance, one person does all the work while the rest of us just show up at the end.”

MiWORD of the Day Is… Radiomics FM: Broadcasting the Hidden Stories in Medical Images

At first glance, radiomics sounds like the name of a futuristic radio station:
“Welcome back to Radiomics FM, where all your favorite tumors are top hits!”

But no, radiomics isn’t about DJs, airwaves, or tuning into late-night medical jams. Instead, it’s about something even cooler: finding hidden patterns buried deep inside medical images and letting ML models “listen” to what those patterns are trying to say.

Imagine staring at a blurry shadow on the wall. Is it a cat? A chair? A really bad haircut?

Medical images, like CT scans, MRIs, and ultrasounds, can feel just as mysterious to the naked eye. They’re full of shapes, textures, and intensity patterns that look like a mess… until you start digging deeper.

That’s where radiomics comes in. Radiomics acts like a detective with a magnifying glass, picking out tiny, subtle clues inside the fuzziness. It systematically extracts hundreds, sometimes even thousands, of quantitative features from images, including:

  • Texture features (like entropy, smoothness, or roughness)
  • Shape descriptors (capturing the size, compactness, or irregularity of objects)
  • First-order intensity statistics (how bright or dark different regions are)
  • Higher-order patterns (relationships between pixel groups, like GLCM and GLRLM matrices)

Each of these features gets transformed into structured data, powerful numbers that machine learning models can analyze to predict clinical outcomes. Instead of relying only on human interpretation, radiomics opens a new window into understanding:

  • Will the tumor grow fast or stay slow?
  • Will the patient respond well to a certain treatment?
  • Could we detect early signs of disease long before symptoms appear?

Fun Fact: Radiomics can spot differences so subtle that even expert radiologists can’t always detect them. It’s like giving X-ray vision… to an already X-rayed image. By turning complex images into rich datasets, radiomics is revolutionizing how we approach personalized medicine. It allows researchers to build predictive models, identify biomarkers, and move toward earlier, more accurate diagnoses without the need for additional invasive biopsies or surgeries.

Radiomics reminds us that in science, and in life, what we see isn’t always the full truth. Sometimes, it’s the quiet, hidden patterns that matter most. So next time you see a grayscale ultrasound or a mysterious CT scan, remember: Behind those shadows, there’s a secret world of patterns and numbers just waiting to be uncovered.

Now, try using radiomics in a sentence by the end of the day!

Serious: “Radiomics enables earlier detection of subtle tumor changes that are invisible to the human eye.”

Not so serious: “I’m using radiomics to decode my friend’s emotions, because reading faces is harder than reading scans.”

See you next time in the blogosphere, and don’t forget to tune out Radiomics FM!

Phoebe (Shih-Hsin) Chuang

Phoebe (Shih-Hsin) Chuang’s ROP299 Journey 

Hi everyone! My name is Phoebe (Shih-Hsin) Chuang, and I’m a third-year Computer Science Specialist student with a minor in Statistics and a focus in Artificial Intelligence. This year, I had the opportunity to work on my first formal research project involving machine learning in the field of medical imaging. Although the experience was often stressful and full of challenges, it has definitely been one of the most meaningful and transformative learning experiences of my undergraduate academic journey so far.

Before starting this ROP, I had no prior experience in either machine learning or medical imaging. Choosing a research topic initially felt overwhelming. Formulating a good research question required a deep understanding of the current state of the field, so I spent a great deal of time reading papers to grasp major trends such as image generation, multimodal learning, image segmentation, and classification tasks. Eventually, I decided to focus on adnexal mass classification using ultrasound images from the lab.

A major challenge for this project was the small dataset size compared to those typically used in current literature. Recognizing this limitation, I explored approaches specifically designed for small data scenarios. I found that radiomics was particularly promising, especially given that deep learning models typically require large datasets to generalize well. To make my approach more nuanced, I chose not just to use extracted radiomics features in numeric form, but to generate radiomic feature maps. This allowed me to integrate them directly into convolutional neural networks, leveraging CNNs’ strengths in learning from images.

Although this may appear minor, aside from selecting the research topic and technical exploration, one of the biggest lessons I learned was the importance of keeping my code, folders, and documentation organized. Without a clear structure from the beginning, it became very easy to get lost, especially when I paused work for a few days. If I could redo the project, I would definitely prioritize setting up a consistent, organized structure early on to save a lot of confusion and debugging time later.

Looking back, I am deeply grateful to Dr. Tyrrell for offering me this invaluable research opportunity. Through weekly meetings, Dr. Tyrrell emphasized that the primary goal of this experience was not simply achieving great results, but learning the full research process, from identifying gaps in knowledge to formulating research questions and hypotheses, designing experiments, and performing rigorous statistical analyses (since this was a statistics department course!). I would also like to sincerely thank Noushin, our postdoc, whose insightful feedback and support helped me greatly in refining my research questions and overcoming challenges during implementation. Finally, I want to thank everyone else in the lab for their encouragement, shared experiences, and thoughtful suggestions during meetings. It was both inspiring and motivating to see everyone’s projects evolve alongside mine.

This ROP journey has definitely been a steep but rewarding learning curve. It has brought me one step closer to becoming an independent researcher, and I look forward to carrying the skills, mindset, and resilience I built this year into my future research and career endeavours.

Xin Lei’s Personal Reflection

Hi! I’m Xin Lei! I was a second-year Computer Science Specialist and Molecular Genetics major student when I began my ROP with Professor Tyrrell.

My project focused on developing a framework that uses Latent Diffusion Models (LDMs) to generate high-fidelity gastrointestinal (GI) medical images from segmentation masks. 

I trained a two-stage pipeline: first, a VQ-GAN model to encode the structure of unlabeled GI images into a latent space and then conditioned a Latent Diffusion Model on segmentation masks to generate corresponding realistic GI tract images. To enhance anatomical diversity, I also designed a novel mask interpolation pipeline to create intermediate anatomical configurations, encouraging the generation of diverse and realistic segmentation-image pairs. It was challenging to tackle the challenge of synthesizing new, varied, and coherent medical images for segmentation tasks, and to push beyond the limitations of existing inpainting and stitching-based generation methods.

Overall, it was a lot of paper reading, GitHub repositories visited, and overnight coding session, all of which would have been impossible without Professor Tyrrell’s continual support and advice! My biggest mistake was not spending enough time reading about the best current methods for solving my problem of interest. Indeed, countless hours would have been saved, if I had found the right repositories and research papers earlier, where others had already implemented parts of the ideas I was trying to build!

Reflecting on my ROP journey, the most difficult part was avoiding the endless rabbit holes of technical optimizations. I would often find myself spending days obsessing over marginal model improvements, investigating every possible architectural tweak or hyperparameter adjustment I could think of. While these deep dives were fun and intellectually stimulating, they were dangerous because no project could ever be delivered on time if perfection was the only goal.

I owe a huge thanks to Professor Tyrrell, who repeatedly pulled me back out of these tangents and helped me refocus on moving the project forward. His guidance taught me one of the most valuable lessons of research: perfect is the enemy of good. A deliverable, working project is far more valuable than an imaginary, flawless one stuck in perpetual revision.

In the end, I am proud of what I accomplished, not just technically, but also in learning how to think more strategically about research. This experience has cemented my excitement about applying AI to real-world medical problems, and I am deeply grateful to Professor Tyrrell and the MiDATA lab for giving me this incredible opportunity.

I can’t wait to see where this journey will take me next!

Xin Lei Lin

MiWord of the Day is… Diffusion!

OK, what comes to mind when you hear the word diffusion? Perfume spreading through a room? A drop of ink swirling into a glass of water? When I first heard the terms “diffusion model”, I thought of my humidifier, chaotically diffusing water droplets in my room.

But today, diffusion has taken on a very new meaning in the world of medical imaging!

You’ve probably heard a lot about GPT recently, models that can generate almost anything: stories, poems, even computer code. But did you know that alongside GPT for text, there are other types of models that generate images, like beautiful paintings, photorealistic pictures… and yes, even medical images?

This is where the “diffusion” in diffusion models comes in! Just like my humidifier slowly releases tiny water droplets into the air, diffusion models spread random noise across an image and then cleverly gather it back together to form something meaningful! In my case, instead of a cat jumping because they saw a cucumber, I generate gastrointestinal tract images from their segmentation masks! (Yes, I agree with you, I am cooler)

But what are segmentation masks?

Elementary, my dear Watson! Segmentation masks are like a topological map, showing the exact locations that Sherlock Holmes (in this case, the radiologist) would search for hidden clues, such as tumors, organs, vessels, to uncover cancerous Moriarty’s next plan. Super important when doctors need to know exactly where to operate or how a disease is spreading.

Until recently, generating these masks required lots of manual work from radiologists, or tons of carefully labeled data. But now?

By training diffusion models properly, we can synthesize realistic segmentation masks, even when data is limited. That means more diverse, more accurate, and more creative ways to augment medical datasets for training better AI models.

It’s like equipping our medical research toolbox with a team of colorful GPUs, each one working like a tireless laboratory assistant, swiftly and precisely creating endoscopy images at the click of a button, generating in moments what used to take hours of painstaking effort. This lets you breathe easy, knowing that your next endoscopy won’t need to be fed into an AI model, thus sparing patient privacy and giving medical professionals more time to focus on what truly matters!

Thank you for reading, and I’ll see you in the blogosphere!

Xin Lei Lin

Nathan Liu’s STA299 Journey

Hi everyone! My name is Nathan Liu, and I am currently a second-year student at the University of Toronto, specializing in Statistics. From May to August 2025, I had the privilege of conducting an independent research project under the supervision of Dr. Pascal Tyrell. I am deeply grateful for his guidance throughout this journey. This was my first time having an independent research experience in data science, and it proved to be both challenging and rewarding. I would love to share some of the lessons I learned during this summer.

At the core of my project, I focused on the problem of automated grading of knee osteoarthritis (KOA) using deep learning. While recent work has shown promising results, the classification of Kellgren–Lawrence grade 2 (KL2) remains particularly unreliable. My study explored how self-supervised learning (SSL), specifically SimCLR embeddings, could be used to relabel ambiguous KL2 cases and improve classification performance. I designed four experimental pipelines: a baseline, a hard relabeling approach, a confidence-based relabeling approach, and a weighted loss strategy. Along the way, I incorporated quantitative evaluations such as bootstrap confidence intervals and McNemar’s test to assess improvements in KL2 reliability.

Before joining this project, I was already interested in the medical applications of machine learning, but I had never worked directly with this kind of research. I still remember my first lab meeting: Dr. Tyrell introduced a wide range of ongoing projects on different diseases, and I felt both excited and overwhelmed by the amount of new information. He warned us that the beginning would be the most difficult stage, but I underestimated just how challenging it would be. As I started exploring public databases, I quickly realized that many were incomplete, with missing labels and ambiguous annotations. This left me uncertain about how to begin. At this stage, I am thankful for the help I received from Noushin and Dr. Tyrell, as well as advice from a previous student in the lab. Their input helped me realize that I needed to commit to working with my own chosen dataset and design a study that I could take full ownership of.

During the research process, I encountered multiple challenges. The KL grading system itself is inherently noisy, and KL2 is especially difficult to identify consistently. On top of that, my dataset was imbalanced, which made model training unstable. Technically, training SimCLR models was not straightforward—convergence was slow, embeddings were difficult to interpret, and results were often not what I expected. Under Dr. Tyrell’s guidance, I learned to compare different baseline models, and switching from ResNet to EfficientNet immediately improved performance. He also encouraged me to experiment with visualization approaches beyond clustering, which eventually led me to explore spatial distance methods for relabeling KL2 cases. Noushin provided very practical advice on tuning SimCLR hyperparameters to maximize feature learning, which was critical to stabilizing my experiments. Throughout this process, I gained a new appreciation for how problem-solving in research often requires a mix of independent exploration, peer support, and careful reading of the literature.

Looking back, I am especially grateful for the structure of weekly lab meetings. They pushed me to stay disciplined, improve my efficiency, and keep refining my research plan. Just as importantly, they gave me the chance to see how other students tackled projects in different medical domains. I was struck by how many of us faced similar problems—unstable models, imperfect data, unexpected results—and it was reassuring to realize I was not alone. Watching others troubleshoot their difficulties often gave me ideas for my own work.

Overall, this project taught me valuable lessons both technically and personally. On the technical side, I became much more comfortable with self-supervised learning, parameter tuning, and methods for quantifying and visualizing results. On the personal side, I developed patience, resilience, and the ability to adapt when experiments did not go as planned. I also improved my academic writing skills and learned how to present my findings in a structured and convincing way. Most importantly, I am thankful to Dr. Tyrell for his constructive advice whenever I felt uncertain, and to Noushin for patiently answering many of my technical questions—even the simplest ones. I also want to thank my peers and all the lab members for their support, encouragement, and good company. This experience has not only strengthened my skills but has also made me more confident about pursuing research in medical imaging and machine learning in the future.

MiWORD of the Day is… McNemar Test!

Remember that famous Spider-Man meme where two Spider-Men are pointing at each other, yelling “You’re me!”? That’s basically the spirit of the McNemar Test. It’s a statistical tool that checks whether the same group of people changes their answers under two different conditions.

Think of it like this: yesterday everyone swore bubble tea was the best, but today half of them suddenly insist black coffee is the only way to survive finals. The McNemar Test is the referee here—it counts how many people actually flipped sides and asks, “Okay, is this change big enough to matter, or is it just random mood swings?”

The McNemar Test works on paired data. The total numbers don’t matter as much as the people who changed their minds.

People who said “yes” before and still say “yes” after → not interesting.

People who said “no” before and still say “no” after → also not interesting.

The stars of the show? Those who said “yes” before and “no” after, and those who said “no” before and “yes” after. The test compares these two groups. If the difference between them is large, it means the change is real, not just random noise.

In clinical research this is super important. Suppose a study tests whether a new drug actually helps with a disease. A total of 314 patients are observed both before and after treatment. Here’s the data:

Here’s what’s going on: 101 stayed sick before and after. 33 stayed healthy before and after.

121 improved (from sick → healthy). 59 worsened (from healthy → sick).

Now, McNemar steps in with this formula:

That comes out to 21.35, which is way too extreme to happen by chance (p < 0.001). Translation: the drug worked—the number of patients who got better is significantly higher than those who got worse.

In medicine (or in evaluating machine learning models), it’s not enough to just report an overall accuracy. What really matters is whether the changes—improvements or mistakes—are meaningful and consistent. The McNemar Test is a simple way to check if those differences are statistically real.

Now let’s use McNemar Test in a sentence.

Serious: In a clinical trial, the McNemar Test showed that significantly more patients improved after treatment than worsened, proving the drug’s effectiveness.

Less Serious: Yesterday my friend swore pizza was the best food on earth. Today she switched to sushi. According to McNemar, this isn’t just random—it’s a statistically significant betrayal.

See you in the blogosphere!

Nathan Liu