Self-Supervised Learning Strategies for a Platform to Test the Toxicity of New Chemicals and Materials

Thomas Lautenschlager, Nils Friederich, Angelo Jovin Yamachui Sitcheu, Katja Nau, Gaëlle Hayot, Thomas Dickmeis, Ralf MikutarXiv 2025

TL;DR

This paper presents a proof-of-concept using Self-Supervised Learning (SSL) to automate high-throughput toxicity testing of chemical compounds without relying heavily on scarce expert labels. By training a SimCLR model on zebrafish embryo images, the authors demonstrate that SSL can successfully learn continuous representations that cluster compounds by their biological modes-of-action, paving the way for integration into automated physical testing devices like TOXBOX.

What Problem Does This Paper Address?

Chemical safety regulations (such as Europe's REACH) mandate that thousands of new compounds be tested for toxicity annually. Traditional in vivo testing on mammals is slow, expensive, and ethically problematic. While New Approach Methodologies (NAMs) leverage high-throughput screening (HTS) using alternative models like zebrafish embryos to generate massive amounts of image data, automating the evaluation of these images introduces two major roadblocks:

  1. Label Scarcity: Expert-annotated biological data is expensive and time-consuming to acquire.
  2. Subjective Cutoffs: Toxicological changes are inherently continuous (e.g., concentration-dependent morphological gradients). Standard supervised machine learning forces these changes into rigid, discrete categories, which introduces observer bias and fails to capture subtle, early-stage variations.

The authors explore how computational models can bridge these gaps by combining multiple experimental readouts.

Diagram of different computational models for toxicity predictions.

Methods

The authors apply Self-Supervised Learning (SSL), specifically the SimCLR framework, to learn visual representations from images without using explicit labels during the initial training phase. SimCLR works by maximizing the similarity between differently augmented views of the same image while minimizing the similarity between entirely different images.

  • Architecture: A standard ResNet50 backbone serves as the encoder, mapping embryo images into a 2048-dimensional latent space.
  • Evaluation via Linear Probing: To evaluate feature quality, the authors freeze the trained ResNet50 encoder and train a simple linear classifier on top of it using labeled data.
  • Latent Space Analysis: The geometry of the learned latent space is analyzed using UMAP for dimensionality reduction, alongside calculations of the mean cosine similarity between individual image representations and normalized class centers.
Simplified diagram of (a) pretraining via SSL and (b) fine-tuning for a downstream task.

Datasets

The approach was validated using the publicly available EmbryoNet dataset, which consists of images of zebrafish (Danio rerio) embryos exposed to various chemical compounds.

  • Classes: The dataset features ten distinct phenotype classes. Seven represent specific signaling pathway disruptions (-BMP, +RA, -Wnt, -FGF, -Nodal, -Shh, -PCP), alongside 'Normal', 'Dead' (coagulated), and 'Unknown' classes.
  • Data Selection: The authors focused on later developmental timepoints (25 to 26 hours post-fertilization) to capture fully formed phenotypes. The final dataset configuration included 135,475 training crops, 15,670 validation crops, and 772 test crops extracted using bounding boxes.

Key Insights and Ideas

  • Continuous Latent Spaces for Continuous Biology: Instead of forcing a mild malformation into a strict "toxic" or "non-toxic" bin, SSL maps images into a continuous space. This mathematically models concentration-dependent gradients, where higher toxicant concentrations push representations further away from the "Normal" cluster in a predictable direction.
  • Clustering by Mode-of-Action (MoA): Because the self-supervised model groups visually similar features without human labels, it inherently clusters compounds that share a biological mechanism. This allows the system to flag unknown compounds that exhibit similar toxic profiles to known hazards.
  • The "Hypersphere Anisotropy" Challenge: A fascinating geometric finding was that the learned representations occupied only a small, tight sub-region of the available hypersphere (minimum cosine similarity of 0.37, mean of 0.64). While a uniform distribution across the hypersphere typically improves performance in general computer vision, it remains an open question whether this "crowding" is an unavoidable property of highly similar, domain-specific biological images.

Key Results

  • Acceptable Downstream Performance: The linear classifier trained on top of the frozen SSL features achieved an overall accuracy of 79.9% on the test set. While this is lower than the fully supervised baseline of 89%, it represents a strong result given that the feature extractor was trained entirely without labels.
  • Perfect Lethality Detection: The model achieved a 100% recall for the 'Dead' class, cleanly separating coagulated embryos from living ones.
  • MoA Separation: Phenotypes like -BMP, -FGF, -Nodal, +RA, and -Wnt showed high recall and distinct clustering. Conversely, ambiguous phenotypes (-PCP and -Shh) yielded lower recall, mirroring the exact difficulties human expert biologists face when classifying them.
UMAP visualization of SimCLR representations showing distinct phenotypic clustering.

Limitations and Future Work

  • Dataset Constraints: The EmbryoNet dataset used identical concentrations for most phenotypes, preventing the authors from empirically verifying concentration-dependent gradients in this specific study.
  • Latent Space Uniformity: The crowding of representations in the latent space needs to be addressed. Future work will explore alternative SSL methods (like DINOv2 or Masked Autoencoders) to see if they yield a better feature distribution.
  • Real-world Deployment Challenges: Integrating these models into physical devices like the TOXBOX platform introduces practical hurdles such as concept drift (gradual changes in data over time due to hardware or environmental shifts) and data imbalance, which will require robust model-monitoring and retraining strategies.

Summary updated

BibTeX
@misc{lautenschlager2025self,
  author = {Thomas Lautenschlager and Nils Friederich and Angelo Jovin Yamachui Sitcheu and Katja Nau and Gaëlle Hayot and Thomas Dickmeis and Ralf Mikut},
  title = {{Self-Supervised Learning Strategies for a Platform to Test the Toxicity of New Chemicals and Materials}},
  year = {2025},
  eprint = {2510.07853},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.07853},
}
Figure