Skip to main content
QUICK REVIEW

[Paper Review] Model Ratatouille: Recycling Diverse Models for Out-of-Distribution Generalization

Alexandre Ramé, Kartik Ahuja|arXiv (Cornell University)|Dec 20, 2022
Domain Adaptation and Few-Shot LearningComputer Science5 citations
TL;DR

This paper proposes Model Ratatouille, a method that improves out-of-distribution (OOD) generalization by recycling diverse fine-tuned models of a foundation model. It initializes multiple parallel fine-tunings on the target task using weights from auxiliary fine-tunings, then averages them—achieving state-of-the-art performance on DomainBed with no additional inference or training cost.

ABSTRACT

Foundation models are redefining how AI systems are built. Practitioners now follow a standard procedure to build their machine learning solutions: from a pre-trained foundation model, they fine-tune the weights on the target task of interest. So, the Internet is swarmed by a handful of foundation models fine-tuned on many diverse tasks: these individual fine-tunings exist in isolation without benefiting from each other. In our opinion, this is a missed opportunity, as these specialized models contain rich and diverse features. In this paper, we thus propose model ratatouille, a new strategy to recycle the multiple fine-tunings of the same foundation model on diverse auxiliary tasks. Specifically, we repurpose these auxiliary weights as initializations for multiple parallel fine-tunings on the target task; then, we average all fine-tuned weights to obtain the final model. This recycling strategy aims at maximizing the diversity in weights by leveraging the diversity in auxiliary tasks. Empirically, it improves the state of the art on the reference DomainBed benchmark for out-of-distribution generalization. Looking forward, this work contributes to the emerging paradigm of updatable machine learning where, akin to open-source software development, the community collaborates to reliably update machine learning models. Our code is released: https://github.com/facebookresearch/ModelRatatouille.

Motivation & Objective

  • Address the limitation of isolated fine-tuning practices, where each model is trained in isolation without leveraging knowledge from other fine-tuned variants.
  • Leverage the diversity of features learned by multiple fine-tuned models on auxiliary tasks to improve robustness on out-of-distribution (OOD) generalization.
  • Develop a strategy that reuses existing fine-tuned models as initialization points for target task fine-tuning, maximizing model diversity.
  • Achieve state-of-the-art OOD generalization performance without incurring additional inference or training overhead compared to standard hyperparameter search.
  • Contribute to the emerging paradigm of updatable machine learning, where models are collaboratively improved through community contributions, akin to open-source software.

Proposed method

  • Repurpose multiple pre-existing fine-tuned models of a foundation model—trained on diverse auxiliary tasks—as initialization weights for new fine-tunings on the target task.
  • Perform independent fine-tuning of the foundation model on the target task using each auxiliary fine-tuned model as a starting point.
  • Aggregate the final weights from all target task fine-tunings by averaging them to form the final model.
  • Use both uniform and greedy selection strategies for choosing auxiliary models to initialize from, evaluating their impact on performance.
  • Ensure the method is computationally efficient by enabling parallel training of multiple fine-tunings, with no additional inference cost.
  • Apply the method across standard benchmarks such as DomainBed, DomainNet, and Camelyon to evaluate OOD generalization across diverse domains.

Experimental results

Research questions

  • RQ1Can reusing diverse fine-tuned models of a foundation model as initialization points improve out-of-distribution generalization on a target task?
  • RQ2How does the diversity of auxiliary tasks influence the performance of the final averaged model in OOD settings?
  • RQ3Does Model Ratatouille outperform existing ensemble and averaging strategies like model soups and DiWA in OOD generalization benchmarks?
  • RQ4Can the method be applied effectively across diverse datasets, including medical imaging (e.g., Camelyon) and fine-grained visual recognition (e.g., TerraIncognita)?
  • RQ5Does the method maintain performance gains when auxiliary tasks are dissimilar to the target task, or does it benefit most when auxiliary tasks are related?

Key findings

  • Model Ratatouille achieves state-of-the-art OOD generalization performance on the DomainBed benchmark, with a 68.1% average accuracy across all datasets, surpassing previous methods including model soups and DiWA.
  • On DomainNet, Model Ratatouille achieves 47.7% average accuracy with uniform selection and 47.7% with greedy selection, matching or exceeding the performance of model soups and DiWA.
  • On the Camelyon histopathology dataset, Model Ratatouille improves OOD generalization over model soups, achieving 95.4% average accuracy (vs. 95.1% for soups) under greedy selection.
  • The method shows robustness to auxiliary task choice: even with distant auxiliary tasks (e.g., from DomainBed on TerraIncognita), it improves performance from 51.4% (model soups) to 51.8% (Model Ratatouille).
  • When a more similar auxiliary task (iWildCam) is used on TerraIncognita, Model Ratatouille achieves 52.9% average accuracy, demonstrating its ability to benefit from relevant auxiliary knowledge.
  • The method incurs no additional inference or training cost compared to standard hyperparameter search, making it practical for real-world deployment.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.