Online Foundation Model Selection in Robotics

Po-han Li, Öykü Selin Toprak, Aditya Narayanan, Ufuk Topcu, Sandeep ChinchaliarXiv 2024 · DOI

Abstract

Modern robotics leverages a wide array of foundation models, from local open-source versions to powerful remote APIs. Selecting the optimal model for a given task involves balancing accuracy, latency, and cost. We propose an online learning pipeline that utilizes a pre-trained multi-modal encoder and Proximal Policy Optimization (PPO) to dynamically select models. Our approach improves task success rates by up to 14% while maintaining operational efficiency across diverse robotic benchmarks.

Introduction

The "model selection problem" is a significant hurdle in deploying foundation models for robotics. Developers must choose between local models (e.g., Octo, LLaMA-7B), which are fast and cost-effective but limited in reasoning, and massive closed-source models (e.g., GPT-4, RT-X), which are highly capable but introduce significant network latency and monetary costs. Traditional supervised selection methods require large, expensive datasets. This work introduces a contextual online learning framework that learns the optimal selection policy during task execution.

Methodology

Our system treats model selection as a contextual multi-armed bandit problem.

Feature Extraction and Contextualization

When a robot receives a natural language command, an open-source multi-modal encoder (such as CLIP) processes both the text instruction and the robot's current visual observation. This generates a fixed-dimensional "context" vector. Because these encoders are pre-trained on vast datasets, they naturally cluster similar tasks in the feature space, allowing the selection policy to generalize quickly.

Online Learning with PPO

The context vector is fed into a Proximal Policy Optimization (PPO) agent. Unlike static selection methods, this contextual approach learns which model is best suited for specific clusters of tasks. For example, simple "pick and place" tasks might be routed to a local model, while complex "heating" or "reasoning" tasks are sent to a remote foundation model.

Reward Optimization

The agent aims to maximize a composite reward function that balances task success with operational efficiency, subtracting penalties for monetary cost and execution latency from the performance score. This formulation allows users to tune the system's behavior based on their specific constraints.

Experimental Evaluation

We evaluated the pipeline across four benchmarks: MMLU (general reasoning), Waymo (object querying in autonomous driving), ALFRED (household task simulation), and Open X-Embodiment (real-world robotic actions).

The selection pipeline was tested on diverse tasks including household manipulation (ALFRED), real-world robotics (Open X-Embodiment), and autonomous driving perception (Waymo).

Key Insights

  • Contextual Clustering: t-SNE visualizations of the feature space confirm that the encoder naturally groups similar robotic intentions. This structural prior is key to the agent's fast convergence, requiring only a few thousand data points to reach optimal performance.
  • Latency as a Critical Factor: For remote models, the overhead of uploading high-resolution images and downloading responses can be the dominant factor in execution time. Our selector identifies tasks where the marginal accuracy gain of a remote model does not justify the latency penalty.
  • Model Nuance: The system exploits the fact that larger models are not always superior for every sub-topic. A contextual selector can identify specific domains where a smaller, specialized model outperforms a larger general-purpose one.

Results

The contextual PPO agent consistently outperformed "Overall Best Model" baselines and standard non-contextual strategies. Key results include:

  • Success Rate: Up to a 14% improvement over non-contextual methods.
  • Efficiency: The agent successfully navigated the Pareto frontier, achieving higher accuracy at lower weighted costs and latency.
  • Convergence: The use of pre-trained features enabled the agent to learn effective policies significantly faster than traditional supervised learning approaches.

Conclusion

This work demonstrates that online foundation model selection is a viable and efficient strategy for modern robotics. By dynamically adapting to task context, robots can maximize performance while minimizing resource consumption. Future work will investigate ensemble outputs and federated learning to further enhance the scalability of this approach.

Summary updated

BibTeX
@misc{li2024online,
  author = {Po-han Li and Öykü Selin Toprak and Aditya Narayanan and Ufuk Topcu and Sandeep Chinchali},
  title = {{Online Foundation Model Selection in Robotics}},
  year = {2024},
  eprint = {2402.08570},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.08570},
}
Figure