Abstract
While the Machine Learning (ML) landscape is evolving rapidly, there has been a relative lag in the development of the "learning systems" needed to enable broad adoption. Furthermore, few such systems are designed to support the specialized requirements of scientific ML. Here we present the Data and Learning Hub for science (DLHub), a multi-tenant system that provides both model repository and serving capabilities with a focus on science applications. DLHub addresses two significant shortcomings in current systems. First, its self-service model repository allows users to share, publish, verify, reproduce, and reuse models, and addresses concerns related to model reproducibility by packaging and distributing models and all constituent components. Second, it implements scalable and low-latency serving capabilities that can leverage parallel and distributed computing resources to democratize access to published models through a simple web interface. Unlike other model serving frameworks, DLHub can store and serve any Python 3-compatible model or processing function, plus multiple-function pipelines. We show that relative to other model serving systems including TensorFlow Serving, SageMaker, and Clipper, DLHub provides greater capabilities, comparable performance without memoization and batching, and significantly better performance when the latter two techniques can be employed. We also describe early uses of DLHub for scientific applications.
Introduction
The rapid evolution of Machine Learning (ML) has transformed many fields, yet the development of the "learning systems" required to support broad adoption in scientific research has lagged. Scientific ML has specialized requirements—such as the need for reproducibility, complex multi-step pipelines, and integration with distributed data facilities—that commercial platforms often fail to address. The Data and Learning Hub for science (DLHub) is a multi-tenant system designed to bridge this gap by providing a centralized repository for publishing, sharing, and serving models tailored for scientific applications.
System Architecture
DLHub employs a three-tier architecture to manage the ML lifecycle effectively. The user-facing Management Service provides a REST API, CLI, and SDK for model publication and metadata definition, handling authentication via Globus Auth. Task Managers act as the orchestrators, monitoring task queues and routing inference requests to the appropriate execution environment. Finally, Executors perform the actual computation.
A key innovation is the Parsl-based executor, which allows DLHub to run any Python 3-compatible function or multi-step pipeline within containerized environments (Docker or Singularity). This ensures that the execution environment is identical every time a model is run, directly addressing the reproducibility crisis in scientific research.
Scientific Workflows and "Servables"
Unlike standard serving tools that often treat models as simple black boxes, DLHub treats models as "servables"—executable objects that include all necessary environments, weights, and metadata. This approach allows researchers to publish models as first-class scholarly objects with DOIs. Furthermore, DLHub supports complex scientific workflows by allowing researchers to link data pre-processing (e.g., using pymatgen for materials data), inference, and post-processing into a single, addressable endpoint.
Performance and Optimization
DLHub achieves low-latency serving, with requests typically handled in under 40ms for complex models and less than 20ms for simple Python functions on a Kubernetes cluster. To further optimize performance for scientific workloads—where identical inputs are often processed repeatedly (e.g., analyzing similar crystal structures)—DLHub implements memoization and batching at the Task Manager level.
As shown in the performance evaluation, enabling memoization can reduce invocation times by a staggering 95.3–99.8%, bypassing the entire inference stack for cached results. This makes DLHub significantly more efficient than commercial alternatives when scientific-specific optimizations can be utilized.
Conclusion
DLHub provides a robust, scalable infrastructure for the scientific community to share and utilize ML models. By integrating with existing ecosystems like Globus and offering specialized optimizations like memoization and containerized pipelines, it democratizes access to high-performance ML serving while ensuring scholarly reproducibility and ease of use across diverse scientific domains.
Summary updated