Towards Faster and More Compact Foundation Models for Molecular Property Prediction
Yasir Ghunaim, Andrés Villa, Gergo Ignacz, Gyorgy Szekely, Motasem Alfarra, Bernard Ghanem
TL;DR
This work targets efficiency in molecular property prediction by compressing the JMP-L foundation model. It identifies diminishing returns from deeper interaction blocks and demonstrates that pruning two blocks reduces parameters by 32% and increases inference throughput by ~1.3x with minimal loss in many tasks. By combining block reduction with knowledge distillation during pre-training and fine-tuning, the authors preserve accuracy on both in-distribution and out-of-distribution tasks while substantially cutting compute. The findings show that block-reduced variants, especially with distillation, offer practical routes to faster, more scalable models for molecular and materials discovery. The results hold across multiple architectures and underscore the value of pre-training-aware compression for domain-specific foundation models.
Abstract
Advancements in machine learning for molecular property prediction have improved accuracy but at the expense of higher computational cost and longer training times. Recently, the Joint Multi-domain Pre-training (JMP) foundation model has demonstrated strong performance across various downstream tasks with reduced training time over previous models. Despite JMP's advantages, fine-tuning it on molecular datasets ranging from small-scale to large-scale requires considerable time and computational resources. In this work, we investigate strategies to enhance efficiency by reducing model size while preserving performance. To better understand the model's efficiency, we analyze the layer contributions of JMP and find that later interaction blocks provide diminishing returns, suggesting an opportunity for model compression. We explore block reduction strategies by pruning the pre-trained model and evaluating its impact on efficiency and accuracy during fine-tuning. Our analysis reveals that removing two interaction blocks results in a minimal performance drop, reducing the model size by 32% while increasing inference throughput by 1.3x. These results suggest that JMP-L is over-parameterized and that a smaller, more efficient variant can achieve comparable performance with lower computational cost. Our study provides insights for developing lighter, faster, and more scalable foundation models for molecular and materials discovery. The code is publicly available at: https://github.com/Yasir-Ghunaim/efficient-jmp.
