Abstract
Modern search engines must navigate diverse user scenarios and optimize multiple objectives simultaneously. AESM² (Automatic Expert Selection for Multi-scenario and Multi-task) addresses this complexity by replacing manually designed, static architectures with an automated, sparse expert selection mechanism. Deployed at AliPay, this hierarchical framework achieves significant performance gains by modeling the natural relationships between scenarios and tasks, dynamically routing information to isolate noise and improve efficiency.
The Challenge of Multi-Scenario Search
In industrial search systems, a single model rarely fits all contexts. Traffic is typically split into various scenarios—such as searching from a home page versus a specialized "vertical" page—and must optimize for multiple tasks, such as Click-Through Rate (CTR) and Conversion Rate (CVR).
Standard approaches like Multi-gate Mixture-of-Experts (MMoE) suffer from two primary flaws. First, they rely on static designs where the assignment of "shared" versus "specific" experts is hard-coded by engineers, making them brittle. Second, they utilize flat structures that ignore the hierarchical relationships inherent in business logic (e.g., a "brand" search domain existing within multiple page channels).
The AESM² Framework
AESM² introduces two primary innovations to overcome these limitations: hierarchical stacking and automatic expert selection.
Hierarchical Stacking
Instead of a flat architecture, AESM² stacks multi-task layers on top of multi-scenario layers. This design allows the model to first distill scenario-specific features before passing them to task-specific towers, mirroring the hierarchical nature of real-world business logic.
Automatic Expert Selection
The core of the framework is an automated selection algorithm. Rather than manually assigning experts, the model calculates the similarity (using KL divergence) between an expert's gating score and two target distributions: a one-hot distribution (representing scenario-specific knowledge) and a uniform distribution (representing shared knowledge). It then automatically selects the top-K experts that best fit these roles for every individual input instance.
To maintain efficiency, AESM² employs a sparse gating mechanism and an auxiliary loss function to encourage clear distinctions between shared and specific experts. Gaussian noise is also added during training to ensure the selection process explores the full expert space and avoids local optima.
Key Results and Industrial Impact
The model was evaluated on massive internal datasets from AliPay and public e-commerce data from AliExpress. AESM² consistently outperformed state-of-the-art baselines, including MMoE, PLE, and STAR, across all scenarios.
- Offline Performance: AESM² achieved the highest AUC for both CTR and CTCVR across all scenario combinations.
- Online Impact: In a two-week A/B test on the AliPay app, the model delivered a +2.61% increase in CVR and a +7.21% increase in Gross Merchandise Volume (GMV).
- Robustness: The model showed particular strength in "hard" scenarios with sparse data, demonstrating its ability to intelligently share information from data-rich domains.
Conclusion and Future Work
AESM² demonstrates that dynamic, instance-level routing effectively mitigates the "seesaw phenomenon"—where improving one task degrades another—by isolating task-specific noise. While highly effective, future iterations aim to automate the discovery of optimal hierarchy depths and explore dynamic sparsity, where the number of active experts can change based on input complexity.
Summary updated