Abstract
Adapting large-scale proprietary language models via APIs is often prohibitively expensive due to high query costs. This paper presents a novel framework for black-box tuning that utilizes a Gaussian Process (GP) surrogate to approximate the foundation model's behavior. By leveraging the GP's predictive uncertainty, the method selectively queries the API only when necessary. Experimental results demonstrate that this approach achieves state-of-the-art performance while reducing API call requirements by over 98% compared to existing online tuning methods.
Introduction
The rapid advancement of Large Language Models (LLMs) has led to the prevalence of proprietary "black-box" models accessible only through APIs. Fine-tuning these models for specific downstream tasks typically requires either offline proxy tuning—which often yields suboptimal performance—or online methods like Consistent Proxy Tuning (CPT) that require an API call for every training sample. The latter, while effective, is economically and computationally unsustainable for large datasets. This research addresses the challenge of achieving high-performance model adaptation under a strictly limited API budget.
Methodology: GP-Enhanced Proxy Tuning
The proposed framework, GP-Enhanced Proxy Tuning, operates in two distinct training phases followed by an inference phase.
Phase 1: GP Surrogate Model Training
Instead of exhaustive API querying, the system identifies a small, diverse subset of the training data (approximately 1%) using Euclidean distance filtering. A Gaussian Process (GP) is then trained on these "LogitMap Pairs" to map input embeddings to the foundation model's output logits. This surrogate provides a computationally cheap approximation of the black-box model's logic.
Phase 2: Uncertainty-Aware Proxy Tuning
A local, smaller "proxy" model is tuned using the GP surrogate. A critical feature of this phase is the uncertainty-aware gating mechanism. The GP provides both a prediction and a variance (uncertainty) score. If the GP's uncertainty exceeds a predefined threshold, the system triggers a real API call to the foundation model. This ensures the proxy model learns from high-fidelity data where the surrogate is unreliable, while saving costs on redundant samples.
Experimental Results
The method was evaluated across 11 NLP benchmarks, including text classification, question answering, and natural language inference. The results indicate that the GP-filter method consistently outperforms standard offline proxy tuning and matches or exceeds the performance of full-resource online methods.
Specifically, on the Llama2-7B model, average accuracy improved from 46.75% to 86.85%. Remarkably, this was achieved with an average API call efficiency of approximately 1.4% to 1.6%, representing a massive reduction in operational costs compared to the 100% requirement of previous state-of-the-art methods like CPT.
Discussion and Conclusion
The success of this approach highlights the significant redundancy in LLM responses across task-specific datasets. A well-trained GP surrogate can capture the underlying "knowledge structure" of a massive model with minimal samples. While the $O(N^3)$ complexity of GPs limits the size of the surrogate training set, the "less is more" principle applies here: a small, high-quality subset often provides better generalization and stability. Future work may explore Bayesian Neural Networks to scale the surrogate to even larger datasets while maintaining uncertainty-aware benefits.
Citation: Xie, Z., et al. (2025). Advanced Black-Box Tuning of Large Language Models with Limited API Calls. arXiv:2511.10210v3.
Summary updated