CoolFace
Apppublic

hugging-science/SciMLx_Production

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

SciMLx: Agent-Driven Autoresearch for Neural Operators

SciMLx is a self-driving research platform designed to radically accelerate the discovery and optimization of high-performance physics-informed AI. By seamlessly blending large-scale scientific literature analysis with high-fidelity physical simulations, SciMLx acts as an autonomous virtual researcher—tirelessly generating hypotheses, designing novel neural architectures, and executing rigorous experiments to solve complex partial differential equations (PDEs).

If you are trying to model fluid dynamics, weather systems, or quantum mechanics, SciMLx transforms months of manual trial-and-error model tuning into overnight, automated breakthroughs.

Vision & Purpose

The discovery of advanced PDE solvers traditionally requires deep domain expertise and extensive manual iteration. Our vision is to democratize and automate scientific machine learning (SciML). SciMLx exists to close the gap between theoretical physics research and practical, high-performance computational models by providing an intelligent loop that reads the latest scientific literature, formulates hypotheses, writes the required code, and rigorously tests those models against high-fidelity physical benchmarks.

Project Scope

In Scope:

  • Autonomous discovery and training of neural operators (like FNOs, MambaNO, KANs).
  • Literature-informed automated hypothesis generation and experiment tracking.
  • High-fidelity PDE simulation benchmarking (e.g., Navier-Stokes, Burgers, Elasticity).
  • Accelerated optimization loops leveraging NVIDIA CUDA and Apple Silicon MLX.

Out of Scope:

  • General-purpose LLM chat interfaces not related to scientific machine learning.
  • Deployment of models to edge devices or real-time control systems (currently focused on the discovery and research phase).
  • Traditional computational fluid dynamics (CFD) simulation engines (SciMLx learns to approximate them, not replace the ground-truth simulators).

Goals & Objectives

  • Short-Term: Provide a robust, "fire-and-forget" experiment harness where a user can specify a physical system, and SciMLx automatically identifies the state-of-the-art neural architecture for it.
  • Long-Term: Build a continuously learning, self-improving "Research Brain" that aggregates knowledge across thousands of PDE experiments to develop generalized foundational models for physics.
  • Success Criteria: Significantly reduce the human time required to discover optimal neural operators, reliably outperforming manual model selection and hyperparameter tuning on standard benchmarks.

Capabilities

At its core, SciMLx is an automated pipeline that can think, code, and test.

Core Capabilities:

  • Automated Research Campaigns: The system can run overnight train-evaluate-diagnose cycles without human intervention.
  • Architecture Scaffolding: SciMLx automatically drafts code for new neural architectures based on recent findings in scientific papers.
  • Hardware-Accelerated Benchmarking: Rapidly evaluate models against a suite of 15+ complex physical phenomena.

Secondary Capabilities:

  • Scientific Foundation Layer: Built-in structural support for real-world physics, including dimensional analysis (units.py), unit tracking, and mathematical transformations (Lie Algebra).
  • Experiment Tracking: Comprehensive logging and visualization of model performance, spectral losses, and physical consistency.

Key Features

  • The "Research Brain": An intelligent agent loop that synthesizes state-of-the-art literature, extracts architectural insights, and applies them to new model designs. This means the system is always up-to-date with the latest scientific breakthroughs.
  • Vast Model Library: Immediate access to over 30 cutting-edge neural operators, ensuring a rich starting point for any physics challenge.
  • Automated Diagnostics: Advanced spectral governors and diagnostics modules that don't just output a loss number, but explain why a model is failing to capture physical phenomena.
  • Dashboard Interface: A web-based visual interface to monitor the autonomous agent's progress, view active hypotheses, and inspect generated architectures in real-time.

Use Cases & Applications

SciMLx is built for computational scientists, machine learning engineers, and R&D labs.

  1. 1.Aerodynamics & Fluid Engineering: Automatically discovering neural solvers for turbulent flows around airfoils, drastically reducing the time needed for aerodynamic shape optimization.
  2. 2.Climate Modeling: Generating fast, learned surrogates for atmospheric and oceanic simulations to enable real-time, high-resolution weather forecasting.
  3. 3.Materials Science: Accelerating the discovery of new alloys by modeling stress, strain, and elasticity across complex geometries without running computationally expensive finite element analyses.
  4. 4.Energy Sector: Optimizing fluid dynamics for wind turbine placement or modeling the thermodynamic properties inside advanced fusion reactors.
  5. 5.Academic Research: Allowing PhD students and researchers to offload the repetitive tasks of architecture tuning and ablation studies, freeing them to focus on high-level theoretical insights.

Benefits & Value Proposition

  • Unprecedented Speed: Automate the mundane aspects of model design and testing, shrinking research cycles from weeks to days.
  • Reduced Bias: Rely on data-driven, systematic exploration of model architectures rather than human intuition, uncovering non-obvious, highly efficient solutions.
  • Cost Efficiency: Maximize GPU utilization by running autonomous, continuous experiment queues.
  • Reproducibility: Every hypothesis, code generation, and benchmark result is systematically tracked, ensuring completely reproducible scientific findings.

Roadmap / Future Capabilities

  • Multi-Agent Collaboration: Introducing specialized agents for distinct tasks (e.g., a "Physicist" agent focusing on constraints and a "Hacker" agent optimizing GPU memory).
  • Foundational Physics Models: Transitioning from single-PDE solvers to generalized models capable of zero-shot physical inference across different domains.
  • Enhanced Open-Source Integration: Direct pipelines to publish successful models and datasets automatically to the Hugging Face Hub.

Technical Stack

  • Python: The core language powering the entire framework.
  • PyTorch & MLX: Dual-backend support for state-of-the-art deep learning and neural operator construction.
  • FastAPI: Provides the high-performance backend and interactive dashboard for monitoring and visualization.
  • UV: Lightning-fast Python package and project management.

Architecture Overview

SciMLx is composed of three primary layers:

  1. 1.The Agentic Layer: A suite of LLM-driven components that handle literature review, hypothesis generation, and code drafting.
  2. 2.The Execution Layer: Robust training loops, hyperparameter optimization, and tracking mechanisms that safely execute generated code.
  3. 3.The Simulation Layer: The physical ground truth. A comprehensive library of PDE simulations used to rigorously benchmark the generated models.

Prerequisites

To run SciMLx, you will need:

  • macOS (with Apple Silicon for MLX support) or a Linux environment.
  • Python 3.11+
  • An NVIDIA GPU (if running PyTorch benchmarks) or Apple Silicon (for MLX).
  • uv installed for dependency management.

Installation & Setup

  1. 1.Clone the repository:
bash
   git clone https://github.com/moatasimfarooque/autoresearch-mlx scimlx
   cd scimlx
  1. 1.Install dependencies using `uv`:
bash
   uv sync
  1. 1.Run a benchmark manually:
bash
   uv run train.py --benchmark burgers_1d --model FNO
  1. 1.Launch the Autonomous Loop:
bash
   uv run autorun.py --auto --commit
  1. 1.Start the Dashboard:
bash
   uv run dashboard/app.py

Configuration

The system relies on several key configurations managed via YAML files and environment variables. Key files include:

  • params.yaml: Defines training hyperparameters, model selection, and physical constants.
  • experiments.yaml: Configures the active research campaigns and agent parameters.
  • API Keys: Ensure your necessary LLM API keys (e.g., OpenAI, Anthropic, or Google) are set in your environment variables for the agentic layer to function.

Contributing Guidelines

We actively welcome contributions! If you are interested in adding new PDE benchmarks, refining the agent prompts, or optimizing operator architectures:

  1. 1.Fork the repository.
  2. 2.Review our CONTRIBUTING.md for coding standards and submission protocols.
  3. 3.Open a Pull Request detailing the scientific or technical improvement.

Authors

  • Moatasim Farooque

Acknowledgments

We thank the open-source community for the foundational research in neural operators, PDE benchmarking, and agentic workflows that have enabled the development of SciMLx.

License

This project is released under an Open License. Please see the LICENSE file for comprehensive details.