AI & Computational Science

Canopy: Exploiting Piecewise Smooth Tree Priors for Multi-Fidelity Bandits

How the science connects

Bayesian Optimizat…Multi-armed bandit

AI Insight

This paper introduces CANOPY, a new algorithm for optimizing tree-structured problems in large language model (LLM) inference, such as model routing and prompt management. Unlike existing methods that assume smooth value functions throughout the tree, CANOPY adaptively learns where smoothness holds and where it breaks down, using inexpensive probes to identify regions requiring more detailed evaluation. The algorithm demonstrates substantial performance improvements across multiple LLM tasks, including 2.9x better recall in model selection and 1.6x more problems solved in software engineering benchmarks.


This work addresses a fundamental bottleneck in deploying LLMs efficiently at scale. By reducing the computational cost of making routing and caching decisions while maintaining accuracy, CANOPY could enable more practical deployment of large model pools and more effective test-time computation strategies, potentially reducing both latency and operational costs for LLM-powered applications.


Understand the Science

Bayesian Optimization Concept coming soon Multi-armed bandit Concept coming soon

⚠️ Preprint – Noch nicht peer-reviewed

Dieser Artikel wurde noch nicht von unabhängigen Experten begutachtet. Die Ergebnisse sind vorläufig und sollten mit Vorsicht interpretiert werden.

Abstract: Many LLM inference problems, including model routing, prefix-cache management, prompt trimming, and test-time search, can be viewed as optimization over a tree. This structure arises naturally from autoregressive generation: every prefix defines a node, and its continuations form a subtree below it. Internal nodes of the tree provide cheap but biased estimates of a region’s value, while leaf evaluations are expensive but accurate. Hierarchical bandit methods can exploit this structure, but typically require a specific smoothness schedule to be specified in advance, even though real objectives are often only piecewise smooth and their optima may lie near sharp boundaries. We introduce CANOPY, a multi-fidelity tree bandit that learns where the smoothness prior is valid rather than assuming it globally. CANOPY uses cheap random-path probes to construct an online certificate of local aggregation bias, then directs expensive leaf evaluations toward cells where the certificate detects a smoothness violation. We prove fixed-budget and regret guarantees whose additional cost is additive in the number of discontinuities, recovering the smooth-tree rate when no violations are present and approaching structure-blind search as violations become dense. Across routing, top-$k$ identification, test-time search, caching, and prompt trimming, CANOPY consistently improves matched-budget performance, including $2.9times$ higher top-10 recall on a 1000-model pool, $1.6times$ more SWE-bench Verified issues resolved than best-of-$N$, and $3.6times$ lower median time-to-first-token with prefix caching.

Source: Canopy: Exploiting Piecewise Smooth Tree Priors for Multi-Fidelity Bandits