Gatekeeper: Improving Model Cascades Through Confidence Tuning
This work addresses the challenge of balancing computational efficiency and performance in model cascades for machine learning practitioners, though it is incremental as it builds on existing routing and deferral mechanisms.
The paper tackles the problem of inefficient model cascades by introducing Gatekeeper, a novel loss function that calibrates smaller models to confidently handle tasks they can perform correctly while deferring complex tasks to larger models, resulting in substantial improvements in deferral performance across image classification, language modeling, and vision-language tasks.
Large-scale machine learning models deliver strong performance across a wide range of tasks but come with significant computational and resource constraints. To mitigate these challenges, local smaller models are often deployed alongside larger models, relying on routing and deferral mechanisms to offload complex tasks. However, existing approaches inadequately balance the capabilities of these models, often resulting in unnecessary deferrals or sub-optimal resource usage. In this work we introduce a novel loss function called Gatekeeper for calibrating smaller models in cascade setups. Our approach fine-tunes the smaller model to confidently handle tasks it can perform correctly while deferring complex tasks to the larger model. Moreover, it incorporates a mechanism for managing the trade-off between model performance and deferral accuracy, and is broadly applicable across various tasks and domains without any architectural changes. We evaluate our method on encoder-only, decoder-only, and encoder-decoder architectures. Experiments across image classification, language modeling, and vision-language tasks show that our approach substantially improves deferral performance.