0 cumulative citations
View corpus contextA solver-guided LLM that routes each inventory instance to one of four MIP formulations more than doubles exact-best expert selection and yields a 12.6 percentage-point improvement in allocation accuracy on JD.com instances, narrowing the gap to the ex-post oracle to 4.85 points.
Citation observations
Cumulative provider counts captured on specific dates; providers are never combined.
Multi-warehouse inventory allocation is typically formulated as a mixed-integer programming (MIP) problem, yet no single formulation consistently matches heterogeneous instance-level regimes induced by demand concentration, inventory imbalance, replenishment scale, service constraints, and forecast volatility. We study this issue as instance-wise operations research (OR) formulation selection, where each allocation instance is assigned to a solver-executable formulation from a candidate OR expert library. We propose a solver-guided large language model (LLM) framework for OR formulation selection, in which each OR expert corresponds to a MIP formulation encoding a distinct allocation priority. To train the selector, the framework first constructs balanced expert-conditioned supervised fine-tuning (SFT) records for schema learning, and then uses MIP solver evaluation on historical instances to convert solver-evaluated allocation-quality gaps into margin-weighted identity preference optimization (IPO) preferences and per-instance expert-score metadata for reward lookup during group relative policy optimization (GRPO) to assign rewards to sampled responses. Experiments on multi-warehouse inventory allocation instances from JD$\mathord{.}$com, one of China's largest e-retailers, demonstrate that GRPO substantially improves expert-selection accuracy relative to the SFT+IPO selector and, more importantly, produces higher realized allocation quality than both the preference-trained selector and the best fixed formulation. With GRPO, Hit Ratio@1 and Hit Ratio@2 increase from 21.45% to 50.42% and from 70.47% to 82.31%. The resulting selector achieves an allocation accuracy gain of 12.57 percentage points over the incumbent baseline, outperforming both the SFT+IPO selector and the best fixed OR expert, and reduces the gap to the ex-post oracle to 4.85 percentage points.
Summary
Main Finding
A solver-guided LLM can effectively route individual multi-warehouse inventory-allocation instances to the best among several hand-crafted MIP formulations, substantially improving realized allocation quality versus a single fixed formulation or a preference-trained selector. In JD.com production data, the full pipeline (SFT + IPO + GRPO) raises Hit Ratio@1 from 21.45% to 50.42%, Hit Ratio@2 from 70.47% to 82.31%, achieves an allocation-accuracy gain of 12.57 percentage points over the incumbent baseline, and reduces the gap to the ex-post oracle to 4.85 pp.
Key Points
- Problem framing: instance-wise OR formulation selection — choose one MIP formulation per allocation instance (SKU + warehouses + replenishment) to maximize realized allocation accuracy under realized demand.
- Candidate expert library: four complementary MIP formulations encoding different allocation priorities:
- LB (Lexicographic Band): maximize in-band replenishment then minimize residual deviation.
- SBD (Scalarized Band-Deviation): weighted tradeoff between band satisfaction and deviation.
- DM (Deviation Minimization): minimize aggregate absolute TID deviation.
- RCB (Reliability-Calibrated Band): penalize band violations more at warehouses with reliable forecasts.
- Progressive solver-guided post-training pipeline:
- Balanced Supervised Fine-Tuning (SFT) to learn schema-consistent selection outputs.
- Identity Preference Optimization (IPO): margin-weighted chosen/rejected pairs constructed from solver-evaluated score gaps (≥5% relative threshold) to improve pairwise discrimination.
- Group Relative Policy Optimization (GRPO): uses precomputed per-instance metadata (expert scores, rankings, best-expert identity, reference score) to compute group-normalized rollout rewards and refine the policy on sampled responses.
- Reward design in GRPO combines normalized realized allocation quality, ranking-aware terms, exact-best supervision, reference-sticking regularization (LB used as reference), and structure/validity penalties.
- Empirical gains concentrate where a dominant expert regime exists; GRPO substantially improves selection and realized utility relative to SFT+IPO and fixed experts.
Data & Methods
- Decision model and evaluation:
- Per-warehouse TID τi = (Ii + xi) / Di for Di > 0; system TID τall = (Σi Ii + R) / (Σi Di).
- Allocation accuracy Accℓ,ℓ(x; Dreal) = fraction of allocated volume sent to warehouses whose realized TID lies within [ℓτall, ℓ̄τall].
- Objective: maximize expected realized per-instance score sq(E) = Acc(xE_q; Dreal_q) by selecting E ∈ E.
- Training-data construction:
- For each historical instance, solve all K candidate MIPs offline with an MIP solver to produce ex-post scores and rankings.
- SFT records: ≈17,000 balanced examples (structured instruction → expert + justification).
- IPO pairs: ≈4,000 margin-weighted preference pairs (filtered and balanced).
- GRPO prompts: ≈2,300 instances with cached per-instance metadata Mq = {sq, ρq, E q, s q, Eref, sref q } for reward lookup.
- Models, solvers, evaluation:
- Base LLM: Qwen3-14B used for all post-training stages.
- MIP solver: SCIP for computing allocation plans and realized scores.
- Evaluation set: 718 real-world multi-warehouse allocation instances from JD.com.
- Metrics: Hit Ratio@1/@2 (oracle-expert identification), Allocation Accuracy Gain over incumbent baseline, Oracle Gap (difference to per-instance ex-post best).
- Key empirical results:
- SFT+IPO+GRPO vs SFT+IPO: HR@1 +28.97 pp (21.45 → 50.42%), HR@2 +11.84 pp (70.47 → 82.31%).
- Allocation-accuracy gain: SFT+IPO+GRPO = +12.57 pp over baseline; SFT+IPO = +9.89 pp; fixed best (LB) = +10.53 pp.
- Oracle gap reduced from 7.53 pp (SFT+IPO) to 4.85 pp (with GRPO).
Implications for AI Economics
- Value of instance-wise routing: Automatically selecting among interpretable, solver-executable formulations yields measurable economic value in inventory allocation (higher realized coverage and better balance), showing substantial returns relative to a one-size-fits-all formulation.
- Complementarity of model and solver: The approach leverages an LLM for heterogeneous-instance understanding and an exact MIP solver for reliable execution, demonstrating a productive hybrid—LLM as high-level router + OR solvers as low-level optimizer—suitable for many operational problems with structured solvers.
- Post-training methods matter: GRPO (group-relative RL) provides significant incremental gains beyond supervised and pairwise-preference training, indicating that policy optimization with per-instance ex-post metadata can better align selectors to downstream economic outcomes.
- Cost/benefit and deployment considerations:
- Offline cost: requires solving all candidate MIPs on historical instances to build supervision/metadata (compute and solver time). This is an upfront cost but amortizable and essential to get reward signals tied to realized demand.
- Runtime cost: inference overhead is small (LLM selection + single MIP solve per instance) compared with solving all candidates online.
- Robustness and generalization: selection depends on historical solver-evaluated realized-demand outcomes; distributional shifts in demand patterns or forecast quality could degrade performance—periodic re-evaluation and re-training (or online adaptation) will be needed.
- Policy and market-level impacts:
- Improved allocation accuracy reduces overstock/stockout risks, improving retailer service levels and lowering holding costs—direct economic gains.
- Interpretable expert library facilitates auditing, scenario analysis, and regulatory compliance compared with opaque end-to-end learned policies.
- The method generalizes to other OR settings (vehicle routing, scheduling, network design) where multiple complementary formulations/algorithms exist and instance heterogeneity is economically relevant.
- Risks and limitations:
- Dependence on realized-demand labels: historical realizations may contain noise or be influenced by external interventions.
- Candidate library design: benefits hinge on having complementary, well-designed formulations; incomplete libraries limit potential gains.
- Potential for overfitting to training regimes; careful validation across business scenarios and regular updates are required.
Possible next steps for practitioners: expand the expert library, instrument ongoing solver-evaluated feedback for continuous retraining, quantify cost savings from deployment, and test robustness under demand-shift scenarios.
Assessment
Claims (5)
| Claim | Direction | Outcome | Confidence & Evidence | Details |
|---|---|---|---|---|
| The SFT+IPO+GRPO selector increases Hit Ratio@1 from 21.45% to 50.42% compared with the SFT+IPO selector, an improvement of 28.97 percentage points. Task Allocation | positive | Whether the selected formulation is the top-ranked expert by realized allocation accuracy |
Reading fidelity
high
Study strength
medium
|
n=718
28.97 percentage points (HR@1 increased from 21.45% to 50.42%)
|
| The SFT+IPO+GRPO selector increases Hit Ratio@2 from 70.47% to 82.31% compared with the SFT+IPO selector, an improvement of 11.84 percentage points. Task Allocation | positive | Whether the selected formulation belongs to the top two experts by realized allocation accuracy |
Reading fidelity
high
Study strength
medium
|
n=718
11.84 percentage points (HR@2 increased from 70.47% to 82.31%)
|
| The SFT+IPO+GRPO selector achieves a 12.57 percentage-point gain in realized allocation accuracy over the incumbent replenishment baseline. Task Allocation | positive | Realized multi-warehouse allocation accuracy relative to the incumbent replenishment baseline |
Reading fidelity
high
Study strength
medium
|
n=718
12.57 percentage points
|
| The SFT+IPO+GRPO selector achieves a larger realized allocation-accuracy gain than both the SFT+IPO selector and the fixed LB expert: 12.57 percentage points versus 9.89 and 10.53 percentage points, respectively. Task Allocation | positive | Realized allocation-accuracy gain over the incumbent replenishment baseline |
Reading fidelity
high
Study strength
medium
|
n=718
12.57 pp versus 9.89 pp and 10.53 pp
|
| GRPO reduces the allocation-accuracy gap to the ex-post oracle from 7.53 percentage points under SFT+IPO to 4.85 percentage points. Task Allocation | positive | Difference between the selected formulation's realized allocation accuracy and the per-instance ex-post oracle |
Reading fidelity
high
Study strength
medium
|
n=718
Oracle Gap decreased from 7.53 pp to 4.85 pp
|