potentialpaper

RSCB: REGIONAL SEMANTIC CONTEXTUAL BANDIT FOR OPTIMAL SELECTION OVER LLM-GENERATED DYNAMIC CANDIDATES

Anonymous authors

ICLR 2027

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

TL;DR. A regional semantic contextual bandit that routes context--arm pairs to region-specific models, avoiding negative transfer; it improves LLM candidate selection where regional structure exists, with regret guarantees independent of the number of arms.

Abstract. Large Language Models (LLMs) increasingly generate multiple candidate solutions for complex tasks such as bug localization, code repair, and tool selection. Selecting among these candidates remains challenging because the available arm set changes across rounds and newly generated arms may have no interaction history. Identity-based or disjoint contextual bandits cannot transfer feedback to such arms, while globally shared semantic linear bandits may suffer negative transfer when heterogeneous context-arm relationships cannot be captured by a single reward parameter. We propose Regional Semantic Contextual Bandits (RSCB), which maintains independent linear reward models over semantic interaction regions and routes each context-arm pair to its corresponding regional model. RSCB selects arms using region-specific upper-confidence scores, transferring feedback among semantically related pairs within each region while restricting transfer across heterogeneous regions. For HH semantic regions, we prove a regret bound of O(mHTlog⁡T)O(m\sqrt{HT}\log T) under regional linear realizability and correct fixed routing. Consequently, for fixed HH, RSCB retains the O(mTlog⁡T)O(m\sqrt{T}\log T) regret rate independent of the number of distinct arms. We further establish an Ω(KtotalT)\Omega(\sqrt{K_{\mathrm{total}}T}) lower bound for arm-independent learning. Finally, under a semantic-continuity assumption, we bound the prediction uncertainty of unseen arms within a correctly routed region. We evaluate RSCB on SWE-bench and an Android/Java security bug dataset, using LLM-generated root-cause hypotheses as arms and objective rewards derived from ground-truth patches. On held-out bugs, RSCB reduces cumulative regret compared to SC-LinUCB and kernelized baselines, with statistically significant improvements on the security dataset. Additionally, RSCB also learns a multi-region structure (H=3H{=}3) on the public BugsInPy benchmark, achieving the lowest regret among all methods.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
15 Sep 2026ICLR 2027 (under review)submittedICLR 2027Under reviewreviews ↓[1]PDF[1]
Missing a version?

ICLR 2027

Under review · 3 reviews · OpenReview

Updated 24 Nov 2026, 17:13 UTC.

Reviewer SUGWOpenReview ↗
Rating
1/4
Confidence
3/4
Soundness
1/3
Presentation
2/3
Informativeness
1/3
Read review
Summary

This paper formulates selecting among LLM-generated candidates as a contextual bandit problem. RSCB partitions context–candidate pairs into regions via k-means on semantic features and maintains a separate LinUCB in each region, with a regret bound under correct routing and an evaluation on bug localization.

Strengths
  • The reward is computed from ground-truth patches rather than an LLM judge.
Weaknesses
  • The motivation is not supported. The premise that LLMs increasingly generate multiple candidates is given without references or evidence, and the reasons for dismissing existing practice (inconsistent self-ranking, expensive validation) are not justified. Existing approaches for selecting among LLM candidates, such as best-of-N with verifiers or reward models, self-consistency, and rerankers, are neither discussed nor compared. The claimed applicability to tool selection and code repair is also not evaluated.
  • The bandit formulation is not realistic. The reward requires the ground-truth patch, which is unavailable when a candidate must be selected. Since rewards for all training candidates can be computed offline, a supervised reranker is the natural baseline but is missing.
  • The technical contribution is limited. The method is k-means clustering followed by one LinUCB per cluster, and the theory sums standard OFUL bounds under assumed correct routing, plus standard lower-bound and Lipschitz arguments.
  • The empirical evidence is weak. The only significant gain over SC-LinUCB is on a private dataset; on both public benchmarks, the improvement is not significant. There is no comparison with a random partition of the same size, and several baselines perform close to random.
Questions for the authors

see above

Reviewer gJm3OpenReview ↗
Rating
1/4
Confidence
2/4
Soundness
1/3
Presentation
2/3
Informativeness
1/3
Read review
Summary

The paper is interested in selecting good candidate solutions generated from LLMs, where each candidate is associated to the general context. The proposed approach, RSCB, uses a learned router that send each context-candidate pair to one of HH separate semantic contextual bandit (SCB). The paper first present theoretical results on upper-bounds on the regret, first for a single SCB, and then for the routed setting. They evaluate the method empirically on three benchmarks, one of them being private.

Strengths
  • Selecting among LLM-generated candidates is a practical and timely problem. Splitting it into region-specific bandits with a learned router is a reasonable design.
  • The semantic context bandit approaches perform well against the baselines across the benchmarks. This gives practical support for the general direction, even though it is unclear how much of the gain comes from routing itself (see Weaknesses).
Weaknesses
  • The major weakness is the limited novelty over SC-LinUCB (Müller, 2025), in both theory and method.
    • The main theoretical analysis covers a single SCB, which is the same setting as SC-LinUCB. It is unclear what is new in these results.
    • The extension to the routed setting (RSCB) is very simple because it directly assumes perfect routing.
    • Regarding the method itself, as the paper notes (l. 171–175), setting H=1H=1 recovers the single global model, i.e., SC-LinUCB. Algorithm 1 (Appendix A) is the same as in Müller (2025).
    • In the SWE-bench experiment,  H=1H=1 and the results match SC-LinUCB.
    • In general, only H∈{1,2,3}H\in \{1,2,3\} is tested, which stays very close to the single-bandit setting. As a result, the contribution specific to routing is not clearly shown.
  • The pipeline has several components that are not described clearly, and many are never ablated. For example, the paper does not show whether the PCA step is needed or how much it matters. This makes it hard to tell which design choices drive the performance.
Questions for the authors
  • Which parts of the theoretical results are new? The theoretical section is too short for me to judge. A clear statement to describe the theoretical results and what they tell us would help.
  • How does performance change with HH ? Can you test values above H=3H=3, or at least compare results over different values ? Do more bandits (finer regions) improve results?
  • Why is PCA always used for dimensionality reduction? How much does the information lost through PCA affect results? An ablation with and without PCA, or with different numbers of components, would clarify this.
Reviewer 34H7OpenReview ↗
Rating
2/4
Confidence
2/4
Soundness
2/3
Presentation
3/3
Informativeness
2/3
Read review
Summary
  • This paper formalizes root-cause hypotheses as a contextual bandit.
  • Specifically, the authors implement a router (based on an element-wise product of the context and candidate embeddings), reduce dimensions, and assign context-candidate pair to one of H regions
  • The authors provide a bound for regret, and empirical experiments show that the semantic bandits outperform on a SWE-bench and proprietary security dataset
Strengths
  • The design is adaptive and enables online updates
  • The authors show that reward is uncorrelated with LLM judge, which confirms there is minimal bias from self-preference in the evaluation.
  • The validation approach is sound. Test data is not seen during training and region count is tuned and frozen over a separate validation split.
Weaknesses
  • The authors only show that performance gains compared to SC-LinUCB are only statistically significant over the proprietary dataset.
  • The regret theory does not cover selection of H in the routing mechanism. As a result, it does not clearly establish whether the key contribution (i.e. the clustering method) affects performance. There is also no ablation of the routing controls.
Questions for the authors
  • larification - Do the baselines all use consistent features, preprocessing, and hyper parameter tuning budgets? Are model parameters updated during test?
  • Clarification - What is the reward signal in deployment when there is no golden patch?
  • Suggestion - Is it possible to re-run with a stronger generator and choice of K? With same H, but random assignment?

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…

This paper is under review