🎯 Mathematical Modeling Agent • 📊 Automated Problem Solving
🤖 Intelligent Code Generation • 📈 End-to-End Workflow
📄 NeurIPS 2025 Paper •  💬 Join WeChat Group •  ⭐ Star Us
- 2026-05 🎉 Open-source Demo Released / 开源 Demo 已发布 🚀 Deploy the upgraded mathematical modeling platform locally with the open-source demo, including the Next.js frontend, FastAPI backend, BYOK configuration, and E2B sandbox support. 欢迎使用开源 Demo 本地部署升级后的数学建模平台,包含 Next.js 前端、FastAPI 后端、BYOK 配置和 E2B 沙盒支持。 👉 使用说明 / Usage: demo/README.md
- 2026-01
🎉 Latest Demo Now Live / 最新演示已上线
🚀 Experience our upgraded mathematical modeling platform! Join our WeChat group to get your invitation code for early access.
欢迎加入我们的微信群获取邀请码,抢先体验升级后的数学建模平台!
👉 访问 /
Visit: http://cdn.mmagent.top/(Our demo link is no longer available due to server expiration. See the open-source demo above.) - 2026-01 ✨ DSLIGHTING: 全流程数据科学智能助手 / End-to-End Data Science Intelligent Assistant 🌟 支持完整的数据科学工作流,数学建模场景专用优化 / Supports complete data science workflow with specialized optimization for mathematical modeling scenarios 👉 访问 / Visit: https://github.com/usail-hkust/dslighting
- 2025-12 🔥 Upcoming Update: We will soon release the latest upgraded version of the demo. Please Star 🌟 our repository! We will issue service accounts based on the Star list (due to limited server capacity) to help everyone better prepare for the MCM/ICM contest. (即将更新:我们将很快发布最新升级版演示。请 Star 🌟 我们的仓库!由于服务器容量有限,我们将根据 Star 列表发放服务账号,帮助大家更好的备战美赛。)
- 2025-10 🚀 MM-Agent assisted two undergraduate teams in winning the Finalist Award (Top 2.0% among 27,456 teams) in MCM/ICM 2025, demonstrating its practical effectiveness as a modeling copilot. 🔗 在线体验 / Online Demo
- 2025-09 🎉 Our paper "MM-Agent: LLMs as Agents for Real-world Mathematical Modeling Problems" has been accepted to the NeurIPS 2025! 📄 Read the paper on arXiv
- 2025-07 🎉 Our paper "MM-Agent: LLMs as Agents for Real-world Mathematical Modeling Problems" has been accepted to the AI4MATH Workshop at ICML 2025! 📄 Read the paper on arXiv
We propose MM-Agent, a mathematical modeling system that simulates the real-world human process of solving mathematical problems. Inspired by expert workflows, our agent systematically analyzes unstructured problem descriptions, formulates structured mathematical models, derives solutions through autonomous code generation, and generates comprehensive analytical reports.
Our paper has been accepted by NeurIPS 2025 and is available on arXiv.
💡 Note: Click the link above to watch the demo on GitHub.
MM-Agent simulates the complete human process of mathematical modeling:
- 🧠 Problem Analysis - Understand problem background, objectives, and constraints
- 📐 Mathematical Modeling - Formulate mathematical models with appropriate assumptions
- 🧮 Computational Solving - Implement algorithms and optimization techniques
- 📝 Solution Reporting - Generate structured reports with clear interpretations
- Automated Model Selection - Intelligently selects appropriate mathematical models
- Interactive Data Analysis - Execute complex analysis with visualizations
- Intelligent Code Generation - Auto-generate and iteratively improve code
- Professional Paper Writing - Generate academic-quality reports automatically
- Project Management - Track and manage multiple modeling projects efficiently
Initialize your modeling workspace effortlessly.

Simply upload your problem statement and datasets.

The agent intelligently selects and builds mathematical models.

Execute complex data analysis and generate visualizations.

Auto-generate professional reports and academic papers.

Track and manage multiple modeling projects efficiently.

The agent simulates a real-world mathematical modeling workflow through four structured stages:
-
🧠 Problem Analysis
- Understands problem background, objectives, data availability, and constraints
- Decomposes complex problems into manageable subtasks
-
📐 Mathematical Modeling
- Translates real-world problems into mathematical models
- Uses appropriate assumptions, formulations, and modeling techniques
- Retrieves suitable methods from the Hierarchical Mathematical Modeling Library (HMML)
-
🧮 Computational Solving
- Implements algorithms, simulations, and optimization techniques
- Autonomously generates and iteratively improves code using MLE-Solver
- Ensures efficient and accurate execution
-
📝 Solution Reporting
- Summarizes the full modeling process
- Interprets results and generates clear, structured reports
Hierarchical Mathematical Modeling Library (HMML) - A tri-level knowledge hierarchy encompassing:
- Domains - High-level modeling categories
- Subdomains - Specialized modeling areas
- Method Nodes - 98 high-level modeling schemas
HMML enables both problem-aware and solution-aware retrieval of modeling strategies, supporting abstraction and method selection through an actor-critic mechanism.
Our demo is available at Hugging Face Spaces.
We provide a local-deployable open-source demo in demo/. It keeps the production-style web service structure, including the Next.js frontend, FastAPI backend, local SQLite storage, BYOK configuration, and one-command startup scripts.
Run it with:
bash demo/scripts/run.shThis package removes committed secrets, public deployment hosts, invite-code scripts, backdoor account scripts, Redis/object-storage runtime state, logs, and historical outputs, while keeping the full local workflow structure.
- OpenAI:
gpt-4o - DeepSeek:
deepseek-R1
You can directly run the Mathematical Modeling Agent with:
python MMAgent/main.py --key "your_openai_key" --task "task_id"Example:
python MMAgent/main.py --key "sk-XXX" --task "2024_C"Here, task corresponds to the problem ID from MM-Bench (e.g., "2024_C" refers to the 2024 MCM problem C).
- Python 3.10 recommended
- Conda (optional but preferred)
- Clone the Repository
git clone git@github.com:usail-hkust/LLM-MM-Agent.git- Create and Activate the Conda Environment
conda create --name math_modeling python=3.10
conda activate math_modeling- Navigate to Project Directory
cd LLM-MM-Agent- Install Dependencies
pip install -r requirements.txtJoin our WeChat group for updates and service support!
For questions and discussions, welcome to:
- 💬 WeChat Group: Scan the QR code above
- 📧 Email: Contact Us
- ⭐ Star us on GitHub and stay tuned!
Source code is licensed under the CC BY-NC 4.0.
If you find this project helpful, feel free to explore more of our work!
🔥 DSLIGHTING - End-to-End Data Science Intelligent Assistant
More Projects: usail-hkust
@misc{mmagent,
title={MM-Agent: LLM as Agents for Real-world Mathematical Modeling Problem},
author={Fan Liu and Zherui Yang and Cancheng Liu and Tianrui Song and Xiaofeng Gao and Hao Liu},
year={2025},
eprint={2505.14148},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2505.14148}
}