Lune

ICML2025Top-tier venue

PAK-UCB Contextual Bandit: An Online Learning Approach to Prompt-Aware Selection of Generative Models and LLMs

Xiaoyan Hu, Ho-fung Leung, Farzan Farnia

Abstract

Selecting a sample generation scheme from multiple prompt-based generative models, including large language models (LLMs) and prompt-guided image and video generation models, is typically addressed by choosing the model that maximizes an averaged evaluation score. However, this score-based selection overlooks the possibility that different models achieve the best generation performance for different types of text prompts. An online identification of the best generation model for various input prompts can reduce the costs associated with querying sub-optimal models. In this work, we explore the possibility of varying rankings of text-based generative models for different text prompts and propose an online learning framework to predict the best data generation model for a given input prompt. The proposed PAK-UCB algorithm addresses a contextual bandit (CB) setting with shared context variables across the arms, utilizing the generated data to update kernel-based functions that predict the score of each model available for unseen text prompts. Additionally, we leverage random Fourier features (RFF) to accelerate the online learning process of PAK-UCB. Our numerical experiments on real and simulated text-to-image and image-to-text generative models show that RFF-UCB performs successfully in identifying the best generation model across different sample types. The code is available at: github.com/yannxiaoyanhu/dgm-online-select.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

8 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Pick-a-Pic: An Open Dataset of User Preferences for Text-to-Image Generation cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Pick-a-Pic: An Open Dataset of User Preferences for Text-to-Image Generation cites ImageReward: Learning and Evaluating Human Preferences for Text-to-Image Generation
  • ImageReward: Learning and Evaluating Human Preferences for Text-to-Image Generation cites Pick-a-Pic: An Open Dataset of User Preferences for Text-to-Image Generation
  • Pick-a-Pic: An Open Dataset of User Preferences for Text-to-Image Generation cites Learning Transferable Visual Models From Natural Language Supervision
  • KODA: Contrastive Representation Comparison and Alignment for Vision-Language Foundation Models cites DAK-UCB: Diversity-Aware Prompt Routing for LLMs and Generative Models
  • KODA: Contrastive Representation Comparison and Alignment for Vision-Language Foundation Models cites SPARKE: Scalable Prompt-Aware Diversity and Novelty Guidance in Diffusion Models via RKE Score
  • KODA: Contrastive Representation Comparison and Alignment for Vision-Language Foundation Models cites When Kernels Multiply, Clusters Unify: Fusing Embeddings with the Kronecker Product
  • KODA: Contrastive Representation Comparison and Alignment for Vision-Language Foundation Models cites Learning Transferable Visual Models From Natural Language Supervision
  • SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesis cites Pick-a-Pic: An Open Dataset of User Preferences for Text-to-Image Generation
  • SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesis cites High-Resolution Image Synthesis with Latent Diffusion Models
  • SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesis cites Learning Transferable Visual Models From Natural Language Supervision
  • DAK-UCB: Diversity-Aware Prompt Routing for LLMs and Generative Models cites Learning Transferable Visual Models From Natural Language Supervision
  • SPARKE: Scalable Prompt-Aware Diversity and Novelty Guidance in Diffusion Models via RKE Score cites High-Resolution Image Synthesis with Latent Diffusion Models
  • SPARKE: Scalable Prompt-Aware Diversity and Novelty Guidance in Diffusion Models via RKE Score cites SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesis
  • SPARKE: Scalable Prompt-Aware Diversity and Novelty Guidance in Diffusion Models via RKE Score cites When Kernels Multiply, Clusters Unify: Fusing Embeddings with the Kronecker Product
  • When Kernels Multiply, Clusters Unify: Fusing Embeddings with the Kronecker Product cites SPARKE: Scalable Prompt-Aware Diversity and Novelty Guidance in Diffusion Models via RKE Score
  • SPARKE: Scalable Prompt-Aware Diversity and Novelty Guidance in Diffusion Models via RKE Score cites Learning Transferable Visual Models From Natural Language Supervision
  • SPARKE: Scalable Prompt-Aware Diversity and Novelty Guidance in Diffusion Models via RKE Score cites MMD Guidance: Training-Free Distribution Adaptation for Diffusion Models via Maximum Mean Discrepancy Guidance
  • When Kernels Multiply, Clusters Unify: Fusing Embeddings with the Kronecker Product cites Learning Transferable Visual Models From Natural Language Supervision
  • ImageReward: Learning and Evaluating Human Preferences for Text-to-Image Generation cites High-Resolution Image Synthesis with Latent Diffusion Models
  • ImageReward: Learning and Evaluating Human Preferences for Text-to-Image Generation cites Learning Transferable Visual Models From Natural Language Supervision
  • MMD Guidance: Training-Free Distribution Adaptation for Diffusion Models via Maximum Mean Discrepancy Guidance cites High-Resolution Image Synthesis with Latent Diffusion Models
  • MMD Guidance: Training-Free Distribution Adaptation for Diffusion Models via Maximum Mean Discrepancy Guidance cites SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesis
  • MMD Guidance: Training-Free Distribution Adaptation for Diffusion Models via Maximum Mean Discrepancy Guidance cites DAK-UCB: Diversity-Aware Prompt Routing for LLMs and Generative Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers8

  1. SPARKE: Scalable Prompt-Aware Diversity and Novelty Guidance in Diffusion Models via RKE ScoreMohammad Jalali, Haoyu Lei, Amin Gohari, Farzan FarniaNeurIPS 2025 · 15 citations
  2. When Kernels Multiply, Clusters Unify: Fusing Embeddings with the Kronecker ProductYouqi Wu, Jingwei Zhang, Farzan FarniaNeurIPS 2025 · 7 citations
  3. DAK-UCB: Diversity-Aware Prompt Routing for LLMs and Generative ModelsDonya Jafari, Farzan FarniaICLR 2026 · 5 citations
  4. MMD Guidance: Training-Free Distribution Adaptation for Diffusion Models via Maximum Mean Discrepancy GuidanceMatina Mahdizadeh Sani, Nima Jamali, Mohammad Jalali, Farzan FarniaICML 2026 · 4 citations
  5. KODA: Contrastive Representation Comparison and Alignment for Vision-Language Foundation ModelsYouqi WU, Mohammad Jalali, Farzan FarniaICML 2026 · 2 citations

Builds on18

  1. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  2. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
  3. SDXL: Improving Latent Diffusion Models for High-Resolution Image SynthesisDustin Podell, Zion English, Kyle Lacey, Andreas Blattmann et al.ICLR 2024 · 4,569 citations
  4. ImageReward: Learning and Evaluating Human Preferences for Text-to-Image GenerationJiazheng Xu, Xiao Liu, Yuchen Wu, Yuxuan Tong et al.NeurIPS 2023 · 1,310 citations
  5. Pick-a-Pic: An Open Dataset of User Preferences for Text-to-Image GenerationYuval Kirstain, Adam Polyak, Uriel Singer, Shahbuland Matiana et al.NeurIPS 2023 · 1,192 citations

Related papers

  1. Be More Diverse than the Most Diverse: Optimal Mixtures of Generative Models via Mixture-UCB Bandit AlgorithmsParham Rezaei, Farzan Farnia, Cheuk Ting LiICLR 2025
  2. Online Multi-LLM Selection via Contextual Bandits Under Unstructured Context EvolutionManhin Poon, Xiangxiang Dai, Xutong Liu, Fang Kong et al.AAAI 2026 · 11 citations
  3. Efficient Multi-objective Prompt Optimization via Pure-exploration BanditsDonghao Li, Chengshuai Shi, Weijuan Ou, Cong Shen et al.ICLR 2026 · 2 citations
  4. BanditSpec: Adaptive Speculative Decoding via Bandit AlgorithmsYunlong Hou, Fengzhuo Zhang, Cunxiao Du, Xuan Zhang et al.ICML 2025
  5. Selecting Better Samples from Pre-trained LLMs: A Case Study on Question GenerationXingdi Yuan, Tong Wang, Yen-Hsiang Wang, Emery Fine et al.ACL Findings 2023 · 21 citations
Dusk over the sea between two cliffs drawn in fine vertical lines