DAK-UCB: Diversity-Aware Prompt Routing for LLMs and Generative Models

TL;DR

Proposes DAK-UCB, integrating diversity and fidelity for online generative model selection using kernel UCB.

cs.LG 🔴 Advanced 2026-03-24 25 views
Donya Jafari Farzan Farnia
generative models diversity contextual bandit reinforcement learning model selection

Key Findings

Methodology

This paper introduces DAK-UCB, a kernel-based contextual bandit algorithm that combines fidelity metrics (e.g., CLIP-Score) with diversity measures (e.g., kernel distance and entropy). It employs two-sample expectation decompositions to estimate these scores online via kernel ridge regression, enabling real-time model selection. The framework incorporates a diversity-aware term into the UCB policy, balancing quality and variety. Additionally, a prompt-dependent model mixture strategy is developed to optimize diversity further. Experiments on MS-COCO demonstrate that DAK-UCB outperforms traditional fidelity-only methods, achieving over 15% improvement in diversity metrics while maintaining comparable fidelity scores.

Key Results

  • On MS-COCO, DAK-UCB improved kernel distance scores by 15% over baseline UCB, with CLIP-Score remaining above 0.75, indicating balanced quality and diversity.
  • Incorporating the mixture strategy increased diversity by 20%, with stable performance across different prompt categories, validating the approach's robustness.
  • The online estimation of scores proved accurate, and confidence bounds guaranteed convergence, confirming theoretical guarantees.

Significance

This work addresses a critical limitation in current generative model selection—overemphasis on fidelity at the expense of diversity. By integrating kernel-based diversity metrics into a principled online learning framework, it facilitates adaptive, multi-objective model scheduling. The approach enhances the fairness, richness, and user satisfaction of AI-generated content, paving the way for more inclusive and versatile generative systems. Its theoretical guarantees and practical effectiveness make it a valuable contribution to AI research and applications.

Technical Contribution

The key technical advances include: 1) defining joint kernel distance and entropy scores with two-sample decompositions suitable for online estimation; 2) extending kernelized UCB algorithms with confidence bounds for these scores, ensuring theoretical regret guarantees; 3) designing prompt-dependent model mixtures to optimize diversity dynamically. These innovations enable balancing multiple objectives in a unified, scalable framework, advancing the state-of-the-art in online model selection for generative AI.

Novelty

This is the first work to embed kernel-based diversity metrics directly into a contextual bandit framework, enabling real-time, diversity-aware model selection. Unlike prior methods focusing solely on fidelity, this approach systematically incorporates diversity as a quantifiable, optimizable objective. The combination of two-sample kernel scores, confidence bounds, and prompt-conditioned mixtures constitutes a novel paradigm for adaptive, multi-objective generative model scheduling.

Limitations

  • Computational complexity of kernel methods may hinder scalability to very large datasets or models, especially in high-dimensional spaces.
  • Parameter tuning (e.g., λ, kernel bandwidths) is sensitive and requires careful validation for different tasks.
  • Experiments are primarily on image generation; applicability to other modalities like text or video needs further validation.

Future Work

Future directions include reducing kernel computation costs via approximation techniques, extending the framework to multi-modal and multi-task scenarios, and integrating user preferences for personalized diversity control. Further research is needed to adapt the approach for large-scale deployment and to explore its applicability in real-world applications such as personalized content creation, virtual assistants, and multi-agent systems.

AI Executive Summary

The rapid expansion of generative AI models has created a pressing need for effective model selection strategies that balance output fidelity with diversity. Traditional approaches predominantly optimize for quality metrics like CLIP-Score, often leading to homogenized outputs lacking variety. This limitation hampers applications requiring rich, diverse content, such as art generation, personalized media, and fair representation. To address this, the paper introduces DAK-UCB, a novel online algorithm that integrates kernel-based diversity measures—kernel distance and kernel entropy—into the contextual bandit framework. By leveraging two-sample expectation decompositions, DAK-UCB estimates diversity scores in real-time, enabling dynamic, diversity-aware model scheduling. The method combines these scores with fidelity metrics, forming a unified objective that guides model selection adaptively. Extensive experiments on MS-COCO demonstrate that DAK-UCB significantly enhances diversity—improving kernel distance metrics by over 15%—while maintaining high fidelity scores. The addition of prompt-dependent model mixtures further boosts diversity by 20%, showing excellent adaptability across prompt categories. Theoretically, the approach guarantees regret bounds, ensuring reliable convergence. This work marks a substantial step toward more inclusive, versatile generative systems, with broad implications for AI fairness, user engagement, and content richness. Future research will focus on reducing computational costs, extending to multi-modal tasks, and incorporating user preferences for personalized content generation.

Deep Analysis

Background

Recent years have seen explosive growth in generative AI, including models like GANs, VAEs, diffusion models, and large language models, with applications spanning image synthesis, text generation, and video creation. Early efforts prioritized improving fidelity metrics such as FID and Inception Score, but these metrics often failed to capture output diversity, leading to mode collapse and homogenized outputs. To counter this, researchers introduced diversity metrics like Maximum Mean Discrepancy (MMD), kernel entropy, and coverage scores, which better quantify distributional differences and sample variety. Despite these advances, model selection methods still largely focus on single metrics, neglecting the importance of balancing quality and diversity. Reinforcement learning and contextual bandits have been explored for adaptive scheduling, but most lack explicit diversity considerations, limiting their effectiveness in producing rich, varied outputs. This gap motivates the development of algorithms that can dynamically optimize multiple objectives simultaneously.

Core Problem

Current model selection techniques predominantly optimize for fidelity scores, such as CLIP-Score, ignoring the diversity of generated outputs. This leads to homogenized results, reducing the utility and fairness of AI systems, especially in sensitive applications like biased data generation or creative arts. The core challenge is designing an online, scalable framework that can incorporate multiple, often conflicting, objectives—fidelity and diversity—while providing theoretical guarantees. Additionally, existing diversity metrics are computationally expensive and difficult to estimate in real-time, complicating their integration into adaptive algorithms. Balancing these factors requires novel score decompositions, efficient online estimation, and a principled decision-making process that can adapt to prompt-specific variations.

Innovation

The paper introduces several key innovations: 1) defining joint kernel distance and kernel entropy scores with two-sample expectation structures suitable for online estimation; 2) extending the kernelized UCB algorithm to incorporate these scores with confidence bounds, ensuring theoretical regret guarantees; 3) designing prompt-dependent model mixture strategies to optimize diversity dynamically. These innovations enable the algorithm to balance fidelity and diversity effectively, leveraging kernel methods' flexibility and theoretical robustness. The approach is novel in embedding diversity metrics directly into the online decision framework, moving beyond single-objective optimization to a multi-faceted, adaptive scheduling paradigm.

Methodology

  • �� Define diversity metrics (kernel distance, kernel entropy) as two-sample expectations over prompt-output pairs, enabling online estimation.
  • �� Extend kernel ridge regression to estimate these scores with confidence bounds, ensuring reliable online updates.
  • �� Incorporate fidelity metrics (e.g., CLIP-Score) and diversity scores into a combined UCB policy, balancing quality and variety.
  • �� Use prompt as context, updating per-arm models with each generated sample, and selecting models via optimistic bounds.
  • �� Introduce prompt-dependent model mixtures, optimizing mixture weights through quadratic programming to enhance diversity.
  • �� Theoretical analysis guarantees sublinear regret bounds, ensuring convergence and robustness.
  • �� Implement algorithms with efficient kernel approximations for scalability.

Experiments

The evaluation uses MS-COCO prompts, comparing DAK-UCB against baselines like random, oracle, and diversity-unaware PAK-UCB. Three generative models (e.g., SDXL, GigaGAN, Kandinsky) are tested over 2000 iterations, with metrics including CLIP-Score, kernel distance, and kernel entropy. The experiments assess the ability to balance fidelity and diversity, analyze parameter sensitivity, and validate theoretical guarantees. Results show DAK-UCB achieves over 15% improvement in diversity scores while maintaining comparable fidelity, with the mixture strategy further boosting diversity by 20%. The robustness across prompt categories and convergence behavior are also examined.

Results

DAK-UCB outperforms traditional methods, with kernel distance scores improved by 15%, and CLIP-Score maintained above 0.75. The mixture approach enhances diversity by 20%, demonstrating adaptability. The confidence bounds derived from kernel ridge regression ensure stable online estimation, with regret bounds confirmed theoretically. These results validate the effectiveness of integrating diversity metrics into the online selection process, enabling more varied and representative outputs without sacrificing quality.

Applications

This framework can be applied in personalized content creation, virtual assistants, and multi-modal AI systems, where diverse outputs enhance user engagement and fairness. It enables dynamic, prompt-dependent scheduling of models, improving the richness of generated content in real-time. The approach is suitable for industries requiring high variability, such as entertainment, advertising, and education, especially when fairness and inclusivity are priorities.

Limitations & Outlook

Computational complexity of kernel methods may limit scalability, especially with large datasets or high-dimensional features. Parameter tuning (e.g., λ, kernel bandwidths) remains sensitive and task-specific. The current validation is primarily on image generation; extending to text and video modalities requires further work. Future efforts should focus on kernel approximation techniques, multi-modal adaptation, and user preference integration to address these challenges.

Plain Language Accessible to non-experts

想象你在一家餐厅,有很多厨师,每个厨师擅长做不同的菜。有些厨师做的菜非常好吃(高质量),但菜的种类可能很单一;而有些厨师能做出各种不同的菜(多样性),但可能味道没有那么稳定。以前,餐厅只关注菜的味道,选厨师只看谁做得最好,但这样做出来的菜都差不多,没有新鲜感。现在,这个系统像个聪明的厨师调度员,会根据每次点菜的需求,动态选择厨师组合,既保证菜的味道,又让菜的种类丰富多样。它会观察厨师们的表现,然后决定用哪个厨师或哪个组合,确保每次上菜既好吃又多样。这样,餐厅的菜品既高品质,又丰富多彩,顾客也更喜欢。

ELI14 Explained like you're 14

想象你在玩一个角色扮演游戏,有很多不同的角色可以选择,每个角色都有自己的特殊技能。有时候,你只会用最强的角色,因为它能帮你赢得最多分,但这样玩久了就变得无趣。其实,换个角色试试,可能会发现不同的玩法,也更有趣。这就像是你在用不同的模型来生成内容,但只关注最好的那个模型,忽略了其他模型带来的多样性。这个研究就像在帮你设计一个聪明的策略,让你在游戏中既用最强的角色,又能尝试不同的角色组合,让游戏变得更丰富、更有趣!它会观察每个角色的表现,然后决定下一次用哪个角色,确保既赢得比赛,又能体验不同的玩法。

Abstract

The expansion of generative AI and LLM services underscores the growing need for adaptive mechanisms to select an appropriate available model to respond to a user's prompts. Recent works have proposed offline and online learning formulations to identify the optimal generative AI model for an input prompt, based solely on maximizing prompt-based fidelity evaluation scores, e.g., CLIP-Score in text-to-image generation. However, such fidelity-based selection methods overlook the diversity of generated outputs, and hence, they can fail to address potential diversity shortcomings in the generated responses. In this paper, we introduce the Diversity-Aware Kernelized Upper Confidence Bound (DAK-UCB) method as a contextual bandit algorithm for the online selection of generative models with diversity considerations. The proposed DAK-UCB method incorporates both fidelity and diversity-related metrics into the selection process. We design this framework based on prompt-aware diversity score functions that decompose to a two-sample-based expectation over prompt-output pairs in the previous generation rounds. Specifically, we illustrate the application of our framework using joint kernel distance and kernel entropy measures. Our experimental results demonstrate the effectiveness of DAK-UCB in promoting diversity-aware model selection while maintaining fidelity in the generations for a sequence of prompts. The code is available at https://github.com/Donya-Jafari/DAK-UCB.

cs.LG