Training a Computer To Act Like a Pathologist

A selection of toxic and normal heterophils organized detected by the computer model
A selection of toxic and normal heterophils organized detected by the computer model
March 3, 2023

As it would turn out, automating avian and reptile CBCs is a bit like solving a Rubik’s Cube in an elevator — pattern recognition on so many levels.

To get down to the bottom of the methods applied to build a system that translates how a pathologist recognizes patterns represented in a blood smear, and how that is translated into an artificial intelligence-based process, I spoke with Moichor Director of Pathology Kyle Webb DVM, DACVP. 

Moichor CTO Thanh Le then explained how Moichor considers these factors while building and optimizing a computer model to interpret thousands of blood smear images.

Signals of Toxic Change

Dr. Webb explained that Moichor is training the computer to recognize visual characteristics of cells present in blood samples so that the clinicians have access to the equivalent of a pathologist looking at every single smear. Recognising these visual characteristics is a fundamental part of identifying patterns. Understanding these patterns and utilizing them to make clinical correlations is the essence of pathology. 

Using inflammation as an example, Dr. Webb explains: “There are multiple ways cells can signal toxic change. Things like abnormal granulation, degranulation, cytoplasmic basophilia, cytoplasmic vacuolation, and nuclear degeneration — all of these are things that I know to look for to recognize heterophils as exhibiting toxic change. These are all things that I continue to train the model to look for.”

“Toxic change is then graded based upon the total number of toxic cells as well as the number of toxic changes within a single cell,”  Dr. Webb continued. “And the greater the severity of toxic change, the more concerned we become that there’s an infectious agent that's causing it. Training the model to recognize toxic change and providing it with a rubric to then grade that toxic change can actually narrow down your list of differential diagnoses in certain contexts.”

Signals of immature cells

Dr. Webb also made note of how recognizing one abnormality on a blood smear leads to additional review. “When I look at a blood smear and see a heterophil that exhibits toxic change, it prompts me to investigate not only for additional toxic heterophils, but other evidence of inflammation as well — such as left shifting.”

“Thankfully, the immaturity of inflammatory cells is not as complicated as toxic change because we are mostly looking at nuclear features, and the biggest thing is nuclear morphology.” 

“It can be more difficult with reptiles because they tend to have a single round to oval nucleus that already looks immature to the naked eye — especially if you're used to seeing mammalian neutrophils that have a very segmented nucleus.”

“In terms of identifying immature heterophils, I'm looking to see if the nucleus has less segmentation than it should — especially in birds. The chromatin pattern will also be less mature, which can be a big help in those reptiles that exhibit very little nuclear segmentation even in mature cells.”

“While this can be a difficult (and time-consuming) distinction to make for even experienced pathologists, once it has been taught to the computer model for a given species, it can be applied to every sample within species accurately and quickly.”

Patterns of Inflammation

There are also other types of inflammatory cells that all have different roles. We use their visual characteristics to distinguish them from one another, which can help us identify patterns of inflammation. These patterns are what allow us to make clinical correlations and formulate differential diagnoses. 

“That’s one reason why it's important for our model to be able to distinguish heterophils from eosinophils in birds and reptiles because they can look very similar, but they mean different things,” Dr. Webb explained. 

“For example, a bird with a heterophilia may not have the same problem as a bird with an eosinophilia. If you’re limited to  light microscopy, these cells can only be distinguished by granule shape, size, and slight color differences.

For a human to tell the difference, sometimes you need to do that on high power. But as the model continues to grow more sophisticated, it can pick out heterophils from eosinophils without any difficulty. And it can do it much more quickly than I can do it,” she noted.

“All told, we’re continuously giving the models more data and refining them with regard to all of these different variables: toxic change, nuclear immaturity, and subtle granule differences. And they all go hand in hand. For example, if I'm not sure if I'm truly seeing mild toxic change, but then I see some left shifted heterophils, that helps support the idea that there is inflammation.

There are many layers of checks and balances. Layers that we are teaching the models, which then synthesize all of this information to identify inflammation in a blood smear in a fraction of the time it would take a clinical veterinarian or a pathologist.”

Training the Model to Recognize Correlating Signals

A key goal for us is to create machine learning models that can learn from expert pathologists like Dr. Webb. Moichor CTO Thanh Le went on to explain the intricacies of the cell recognition training and operating processes. 

"We embrace all the distinctions and clinical correlations that Dr. Webb has pointed out. Among other factors, the distilled knowledge from our clinical experts inform how we build systems that distinguish healthy and unhealthy cell signals, instead of blindly solving problems without understanding the deep biological and/or clinical basis," Le said.

“For example, when Dr. Webb looks at a sample containing a toxic heterophil and tells us,  “this is toxic, and here are the parameters used to identify this as toxic,” this ground-truth clinical data is captured in our database and the  data is associated with the image of that toxic cell within the sample.” 

“Our models are based on Convolutional Neural Networks (CNN), a type of deep neural network that is specially suited for analyzing image data. When a CNN is trained on the image sample, it scans the entire sample and learns image ‘features’ which enable it to understand different signals signifying various cellular characteristics such as toxicity and immaturity.” 

“The learning process takes place over thousands of samples and evolves the features that the CNN uses to make this distinction, preserving features that are helpful and modifying unhelpful features to become more relevant to visually analyze cell images.” 

“This explanation holds for the simple example case we have described, of distinguishing between two types of cells in one species of animal. But, the story gets a little more complicated when we start addressing the more important problems: identifying multiple types of cells across many animal species, each of which may have differences in cell morphology that are crucial for making accurate diagnoses.” 

“Handling multiple species is an evolving process that benefits from the accumulation of data. We address this in our databases with a hierarchical process that associates one of several related reference models to collections of similar species that share diagnostic criteria.”

“This is similar to how a human handles diagnoses across species — when Dr. Webb looks at a slide she uses contextual knowledge of the patient’s species compared with others to contextualize her classifications of cells.”

“This ongoing and evolving process will change the face of avian and reptile diagnostics. The more data that moves through, the more sophisticated our model becomes.” 

So, thank you for being a part of making this possible. We are so excited to marry our vision with your clinical acumen and together realize better health outcomes for avian and reptile patients.


Training a Computer To Act Like a Pathologist

As it would turn out, automating avian and reptile CBCs is a bit like solving a Rubik’s Cube in an elevator — pattern recognition on so many levels.

March 3, 2023
No items found.
Close icon "X"


Monthly updates on science and technology shaping our future.