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.
翻译:生成式AI和大语言模型服务的扩展凸显了对自适应机制的需求,以选择合适可用模型响应用户提示。近期工作提出了基于离线与在线学习框架的方法,通过最大化基于提示的保真度评估分数(如文本到图像生成中的CLIP分数)来识别输入提示的最优生成模型。然而,此类基于保真度的选择方法忽视了生成输出的多样性,可能导致生成的响应在多样性方面存在缺陷。本文提出多样性感知核化上置信界(DAK-UCB)方法,作为一种考虑多样性因素的在线生成模型选择情境赌博机算法。该方法将保真度与多样性相关指标同时纳入选择过程。我们基于提示感知的多样性评分函数设计该框架,该函数可分解为对先前生成轮次中提示-输出对的双样本期望。具体而言,我们通过联合核距离与核熵度量展示了该框架的应用。实验结果表明,DAK-UCB在促进多样性感知模型选择的同时,能有效保持对提示序列生成的保真度。代码见https://github.com/Donya-Jafari/DAK-UCB。