The Invisible Lottery: How Subtle Cues Steer Algorithm Choice in LLM Code Generation
- URL: http://arxiv.org/abs/2606.04057v1
- Date: Tue, 02 Jun 2026 11:17:28 GMT
- Title: The Invisible Lottery: How Subtle Cues Steer Algorithm Choice in LLM Code Generation
- Abstract summary: Incidental prompt cues, meaning contextual words or metadata outside the task specification, can steer which algorithm the model selects.<n>We define algorithm steering as cue-induced shifts in algorithm-family distributions.<n>Direct algorithm naming is the most reliable mitigation we tested.
- Score: 0.6564588068252765
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Large language models (LLMs) now generate substantial production code, often for tasks with multiple valid algorithmic solutions. Incidental prompt cues, meaning contextual words or metadata outside the task specification, can steer which algorithm the model selects, even when all outputs pass the same tests. Prompt sensitivity is well studied as a tool to improve output quality. Here, output policy means algorithm choice under fixed correctness. We define algorithm steering as cue-induced shifts in algorithm-family distributions and run 46,535 controlled experiments across 11 tasks, 19 cue types (18 channels plus a memoization semantic-vs-surface ablation that preserves meaning while changing typography and punctuation), and 15 model configurations. We find large, systematic shifts in algorithm-family distributions (up to 100 pp), largely consistent with cue semantics, including in applied tasks such as rate limiting. Direct algorithm naming is the most reliable mitigation we tested. Accidental context therefore creates an "invisible lottery" over performance, security, and maintainability.
Related papers
- Quality Control Algorithms for Pattern Counting [17.340766930817335]
Empirical algorithms have not exploited the asymmetry in the definition of quality control problems.<n>We show that by taking advantage of the asymmetry in the definition of quality control, we give algorithms that run in poly$(k)$ time to solve these problems.
arXiv Detail & Related papers (2026-08-04T10:35:00Z) - Budget-Efficient Automatic Algorithm Design via Code Graph [2.982218441172364]
Large language models (LLMs) have emerged as powerful tools for automatic algorithm design (AAD)<n>We formalize budget-efficient automatic algorithm design, wherein the search policy maximizes realized fitness subject to limited computational cost.<n>We validate our method empirically on three optimization problems, demonstrating consistent superiority of our graph-based search over full-algorithm search at equal token budget.
arXiv Detail & Related papers (2026-05-11T14:01:52Z) - Provable Scaling Laws for the Test-Time Compute of Large Language Models [84.00141420901038]
We propose two algorithms that enjoy provable scaling laws for the test-time compute of large language models.<n>One is a two-stage knockout-style algorithm, where each candidate is evaluated by its average win rate against multiple opponents.<n>The other is a two-stage league-style algorithm, where each candidate is evaluated by its average win rate against multiple opponents.
arXiv Detail & Related papers (2024-11-29T05:29:47Z) - Semi-Bandit Learning for Monotone Stochastic Optimization [16.921694787482213]
A generic online learning algorithm is developed for a class of ''monotone'' problems.<n>Our framework applies to several fundamental problems such as prophet inequality, Pandora's box, single-resource revenue management and posted pricing.
arXiv Detail & Related papers (2023-12-24T07:46:37Z) - Large Language Model-Enhanced Algorithm Selection: Towards Comprehensive Algorithm Representation [27.378185644892984]
This paper introduces Large Language Models (LLMs) into algorithm selection for the first time.
LLMs not only captures the structural and semantic aspects of the algorithm, but also demonstrates contextual awareness and library function understanding.
The selected algorithm is determined by the matching degree between a given problem and different algorithms.
arXiv Detail & Related papers (2023-11-22T06:23:18Z) - Adversarially Robust Distributed Count Tracking via Partial Differential
Privacy [17.43748116766233]
We study the distributed tracking model, also known as distributed functional monitoring.
This model involves $k$ sites each receiving a stream of items and communicating with the central server.
For count tracking, it is known that there is a $sqrtk$ gap in communication between deterministic and randomized algorithms.
arXiv Detail & Related papers (2023-11-01T07:42:13Z) - Machine Learning for Online Algorithm Selection under Censored Feedback [71.6879432974126]
In online algorithm selection (OAS), instances of an algorithmic problem class are presented to an agent one after another, and the agent has to quickly select a presumably best algorithm from a fixed set of candidate algorithms.
For decision problems such as satisfiability (SAT), quality typically refers to the algorithm's runtime.
In this work, we revisit multi-armed bandit algorithms for OAS and discuss their capability of dealing with the problem.
We adapt them towards runtime-oriented losses, allowing for partially censored data while keeping a space- and time-complexity independent of the time horizon.
arXiv Detail & Related papers (2021-09-13T18:10:52Z) - Towards Meta-Algorithm Selection [78.13985819417974]
Instance-specific algorithm selection (AS) deals with the automatic selection of an algorithm from a fixed set of candidates.
We show that meta-algorithm-selection can indeed prove beneficial in some cases.
arXiv Detail & Related papers (2020-11-17T17:27:33Z) - Adaptive Sampling for Best Policy Identification in Markov Decision
Processes [79.4957965474334]
We investigate the problem of best-policy identification in discounted Markov Decision (MDPs) when the learner has access to a generative model.
The advantages of state-of-the-art algorithms are discussed and illustrated.
arXiv Detail & Related papers (2020-09-28T15:22:24Z) - A Systematic Characterization of Sampling Algorithms for Open-ended
Language Generation [71.31905141672529]
We study the widely adopted ancestral sampling algorithms for auto-regressive language models.
We identify three key properties that are shared among them: entropy reduction, order preservation, and slope preservation.
We find that the set of sampling algorithms that satisfies these properties performs on par with the existing sampling algorithms.
arXiv Detail & Related papers (2020-09-15T17:28:42Z) - Run2Survive: A Decision-theoretic Approach to Algorithm Selection based
on Survival Analysis [75.64261155172856]
survival analysis (SA) naturally supports censored data and offers appropriate ways to use such data for learning distributional models of algorithm runtime.
We leverage such models as a basis of a sophisticated decision-theoretic approach to algorithm selection, which we dub Run2Survive.
In an extensive experimental study with the standard benchmark ASlib, our approach is shown to be highly competitive and in many cases even superior to state-of-the-art AS approaches.
arXiv Detail & Related papers (2020-07-06T15:20:17Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.