Abstract
Training generative models that capture rich semantics of the data and interpreting the latent representations encoded by such models are very important problems in un-/self-supervised learning. In this work, we provide a simple algorithm that relies on perturbation experiments on latent codes of a pre-trained generative autoencoder to uncover an attribute graph that is implied by the generative model. We perform perturbation experiments to check for influence of a given latent variable on a subset of attributes. Given this, we show that one can fit an effective graphical model that models a structural equation model between latent codes taken as exogenous variables and attributes taken as observed variables. One interesting aspect is that a single latent variable controls multiple overlapping subsets of attributes unlike conventional approaches that try to impose full independence. Using a pre-trained generative autoencoder trained on a large dataset of small molecules, we demonstrate that the graphical model between various molecular attributes and latent codes learned by our algorithm can be used to predict a specific property for molecules which are drawn from a different distribution. We compare prediction models trained on various feature subsets chosen by simple baselines, as well as existing causal discovery and sparse learning/feature selection methods, with the ones in the derived Markov blanket from our method. Results show empirically that the predictor that relies on our Markov blanket attributes is robust to distribution shifts when transferred or fine-tuned with a few samples from the new distribution, especially when training data is limited.
Introduction
Deep learning models are notoriously good at finding patterns, but they are equally prone to latching onto spurious correlations—statistical artifacts that do not represent underlying physical reality. When these models are deployed on out-of-distribution data, they often fail because those artifacts disappear. In drug discovery, this is a massive hurdle. Labeled data for pharmacokinetic properties (ADME) is incredibly expensive and time-consuming to produce, leading to a "small data" problem where models must predict properties for novel molecular scaffolds using very few training examples.
Researchers have developed PerturbLearn, a method to "poke" the latent space of pre-trained molecular generative models to uncover hidden structural relationships between chemical attributes. By identifying the Markov Blanket—the minimal set of relevant features—for a specific property, they can build predictive models that are significantly more robust to distribution shifts and require far less labeled data to fine-tune.
Methodology
The PerturbLearn algorithm operates in three main stages to extract structural knowledge from large-scale unsupervised generative models.
1. Latent Perturbation and Sensitivity Analysis
The process begins with a pre-trained generative autoencoder. The algorithm systematically "nudges" individual dimensions in its latent space and observes how these tiny changes in the "code" translate into changes in the physical attributes of the generated molecules. This sensitivity data reveals which latent variables control which subsets of attributes.
2. Graph Construction and Markov Blanket Extraction
Using the sensitivity data, a "peeling algorithm" constructs a Directed Acyclic Graph (DAG). This graph represents the hierarchy of attributes—which ones influence others and which latent variables control them. To predict a specific property, the algorithm extracts its Markov Blanket from the learned graph. In graphical modeling, the Markov Blanket is the "neighborhood" of a node that contains all the information needed to predict it, making everything else redundant.
Experimental Results
The study utilized the Therapeutics Data Commons (TDC), focusing on nine regression tasks in the pharmacokinetics domain. Crucially, the authors used scaffold splitting, which ensures the training and test sets contain structurally distinct molecules, providing a realistic test of robustness.
Key Findings
- Superior Generalization: On the FreeSolv benchmark, the PerturbLearn (PL) blanket achieved a Mean Absolute Error (MAE) of 0.99 with zero fine-tuning, significantly beating the raw latent vector (1.33) and all-attributes (1.22) baselines.
- Robustness to Shift: In the Half-life dataset, the PL blanket remained competitive or superior across all fine-tuning sizes (from $n=7$ to $n=100$), showing that the selected features are inherently more stable across chemical domains.
- Sample Efficiency: When training data is limited to just a few samples, the predictor relying on Markov blanket attributes is significantly more robust to distribution shifts compared to standard feature selection or full latent space models.
Conclusion and Future Work
PerturbLearn demonstrates that generative models implicitly learn the "mechanisms" of the data. By treating these models as causal proxies, we can identify structurally relevant features that are far more transferable than simple correlations. While the current method assumes linear relationships and relies on a pre-determined set of attributes, future work could explore non-linear dependencies and the integration of expert chemical priors to further refine the learned attribute graphs.
Summary updated