Toxicity assessment in histopathology using Mahalanobis distance

Discover how AI detects hepatic toxicity with the Mahalanobis distance, improving accuracy in preclinical studies.

miércoles, 1 de julio de 2026 • 2 min read • Q2BSTUDIO Team

Pixel-level anomaly detection in rodent liver

In the preclinical phase of pharmaceutical development, early detection of drug-induced toxicity remains a critical factor determining the success or failure of a compound. Histopathology, considered the gold standard for evaluating tissue damage, relies heavily on interpretation by expert pathologists, creating a bottleneck in large-scale screening processes. Recently, artificial intelligence-based approaches have proven capable of automating the analysis of whole slide images (WSI), such as those of rodent liver, identifying healthy tissue and known abnormalities, and also detecting samples that do not conform to training patterns through out-of-distribution (OOD) detection methods. A concrete example is the use of the Mahalanobis distance with class-specific thresholds, which minimizes the risk of overlooking lesions, prioritizing safety. This type of system requires custom software that integrates vision transformer models, fine-tuning with low-rank adaptation (LoRA), and pixel-level segmentation mechanisms.

The implementation of these solutions not only improves diagnostic accuracy —with error rates below 1% in pathological tissue classified as healthy— but also opens the door to broader applications in the biopharmaceutical industry. To achieve effective integration in laboratory environments and comply with AI for business regulations, it is necessary to have a team that develops custom applications capable of handling large volumes of data, connecting with cloud platforms such as aws and azure cloud services, and ensuring the cybersecurity of sensitive information. Furthermore, results analysis can be enhanced with business intelligence services and tools such as power bi to generate dynamic reports that R&D teams interpret seamlessly.

From a technical perspective, the use of the Mahalanobis distance allows establishing adaptive thresholds that balance the false positive and negative rates, an indispensable requirement in the context of toxicological safety. The combination of artificial intelligence with AI agents capable of monitoring preclinical workflows represents a qualitative leap in efficiency. Companies like Q2BSTUDIO offer precisely that ecosystem: development of custom applications, deployment on cloud infrastructure, and process automation consulting, all aimed at transforming complex data into actionable decisions. AI-assisted histopathology is not a distant promise; its technical feasibility is already demonstrated, and the challenge lies in scaling it with quality, safety, and performance standards that only a specialized technology partner can guarantee.

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.