Large Language Model for Operations Research Formulation Selection in Multi-Warehouse Inventory Allocation addresses the challenge of selecting the most effective mathematical optimization strategy for inventory management. Because different warehouse scenarios—such as varying demand levels or forecast volatility—require different optimization priorities, the authors propose an AI-driven framework that routes each specific inventory allocation instance to the most suitable mixed-integer programming (MIP) formulation.
The Problem: Heterogeneous Inventory Needs
Multi-warehouse inventory allocation is typically solved using mixed-integer programming (MIP). However, the authors, Jintao Xu, Yingzheng Ma, Jiong Dong, Yongzhi Qi, and Jianshen Zhang, note that no single formulation works for every situation. Factors like demand concentration, inventory imbalance, and service constraints mean that a strategy optimized for one warehouse might perform poorly for another. Currently, systems often rely on a fixed formulation, which the authors argue is frequently mismatched with the specific needs of individual stock-keeping units (SKUs).
The Approach: Solver-Guided LLM Routing
The researchers developed a framework that uses a Large Language Model (LLM) to act as a "selector." Instead of generating new code, the LLM analyzes the characteristics of an allocation instance and chooses one of four predefined "OR experts"—specialized MIP formulations—from a library.
The training process involves three progressive stages:
Supervised Fine-Tuning (SFT): The model is trained on balanced records to learn how to map instance characteristics to the correct formulation.
Identity Preference Optimization (IPO): The model is refined using pairwise comparisons, where it learns to prefer formulations that result in higher allocation quality based on historical solver data.
Group Relative Policy Optimization (GRPO): The model samples multiple potential choices for a single instance and receives rewards based on metadata derived from offline solver evaluations. This stage allows the model to learn from its own successful and unsuccessful selections.
Performance Results
The framework was tested on real-world data from JD.com. By using the full SFT+IPO+GRPO pipeline, the selector significantly outperformed simpler methods. According to the paper, the Hit Ratio@1 (the accuracy of selecting the single best expert) increased from 21.45% to 50.42%. Furthermore, the system achieved an allocation accuracy gain of 12.57 percentage points over the incumbent baseline used by the retailer. The authors report that this approach reduces the performance gap to an "ex-post oracle"—the theoretical best possible selection—to 4.85 percentage points.
Key Considerations
The effectiveness of this framework relies on the quality of the candidate library and the offline solver evaluations. The authors note that the library consists of four specific formulations: Lexicographic Band (LB), Scalarized Band-Deviation (SBD), Deviation Minimization (DM), and Reliability-Calibrated Band (RCB). The system is designed to combine the reasoning capabilities of an LLM with the reliability of explicit, solver-executable OR formulations. The authors emphasize that this division of labor allows the system to maintain the rigor of traditional optimization while gaining the adaptability of machine learning.
Comments (0)
to join the discussion
No comments yet
Be the first to share your thoughts!