TLDR: FlexMol is a novel molecular pre-training framework that learns unified representations from both 2D and 3D molecular data. It addresses the limitations of previous methods by supporting single-modality inputs through a two-stage training process and specialized decoders that generate features for missing modalities. This flexibility allows FlexMol to achieve superior performance in molecular property prediction and conformation generation tasks, often outperforming models trained on larger datasets, and demonstrating robustness with incomplete data.
Molecular representation learning is a cornerstone technology, driving advancements in critical fields like drug discovery and material design. The ability to accurately understand and predict how molecules behave is crucial for developing new medicines and innovative materials. This understanding often relies on two distinct but complementary types of molecular information: 2D molecular graphs, which depict chemical connectivity, and 3D geometric conformations, which provide spatial and electronic details essential for molecular interactions.
However, existing methods for learning from both 2D and 3D molecular data face significant challenges. Some approaches train separate models for each modality, which can hinder the effective use of information across these different views. Other methods attempt to unify 2D and 3D representations within a single model but often require perfectly paired 2D and 3D data for every molecule. This poses a limitation when one modality is unavailable or too costly to generate, leading to less effective models when only single-modality data is present.
Introducing FlexMol: A Flexible Solution
To overcome these limitations, researchers have proposed FlexMol, a novel and flexible molecule pre-training framework. FlexMol is designed to learn unified molecular representations while uniquely supporting single-modality input. This means it can effectively learn even when only 2D or only 3D information for a molecule is available, in addition to handling paired data.
Inspired by successful vision-language models, FlexMol employs separate models for 2D and 3D molecular data. A key innovation is the use of parameter sharing across these models, which boosts computational efficiency. Furthermore, FlexMol incorporates specialized decoders that can generate features for a missing modality. For instance, if only 2D data is provided, a decoder can infer and generate the corresponding 3D features, and vice versa. This enables a continuous, multi-stage learning process where both modalities contribute collaboratively during training, ensuring robustness even when only one modality is available during inference.
How FlexMol Works: A Two-Stage Approach
FlexMol’s pre-training process unfolds in two distinct stages:
The first stage involves pre-training on paired 2D and 3D molecular data. Here, the model learns a foundational, unified molecular representation. It uses separate encoders for 2D and 3D features, which then align their representations using a technique called contrastive learning. This ensures that the model understands the relationships between the 2D and 3D aspects of a molecule.
The second stage focuses on continuous learning using single-modality data. This is where FlexMol’s flexibility truly shines. If the model encounters a molecule with only 2D information, it uses a 2D-to-3D decoder to generate the missing 3D features. Similarly, for 3D-only data, a 3D-to-2D decoder reconstructs the 2D features. These generated features are then integrated with the available modality by a multi-modal encoder, allowing the model to refine its understanding and learn comprehensive representations even from incomplete inputs. This unique capability ensures that FlexMol remains effective and robust in real-world scenarios where complete paired data might be scarce.
Impressive Performance Across Tasks
Extensive experiments demonstrate FlexMol’s superior performance across a wide range of molecular property prediction tasks. It consistently outperforms baseline models trained on smaller or similar-scale datasets. Remarkably, FlexMol also achieves competitive or even superior performance compared to large-scale, state-of-the-art models like GEM and Uni-Mol, even though these models are often pre-trained on significantly larger datasets (exceeding 10 million samples, compared to FlexMol’s 5.4 million combined samples).
Beyond property prediction, FlexMol also shows strong results in molecule conformation generation, a task crucial for understanding molecular dynamics. It generates diverse and accurate 3D molecular conformations, demonstrating its precision in structural alignment.
An in-depth analysis revealed that each component of FlexMol contributes to its overall success. The ability to handle both 2D and 3D features, the contrastive learning for alignment, and the multi-modal encoder for fusion are all critical. The decoders, in particular, are essential for cross-modality translation, enabling the model to function effectively with single-modality inputs.
Also Read:
- Accelerating Molecular Design: A Training-Free Approach to Faster Geometry Generation
- GeoMancer: A Geometric Approach to Graph Generation and Prediction
Looking Ahead
While FlexMol represents a significant leap forward, the researchers acknowledge that its scalability is currently limited by the availability of paired data. Performance improvements from single-modal data in the second stage are still somewhat dependent on the amount of paired data used in the first stage. Future work will focus on balancing paired and single-modal data more effectively and constructing higher-quality paired datasets to further enhance modality alignment and enable even larger-scale learning.
This innovative framework offers a promising direction for molecular representation learning, providing a more flexible and efficient tool for scientific discovery. You can read the full research paper for more details: Unified Molecule Pre-training with Flexible 2D and 3D Modalities.


