Skip to main content
QUICK REVIEW

[Paper Review] Patching open-vocabulary models by interpolating weights

Gabriel Ilharco, Mitchell Wortsman|arXiv (Cornell University)|Aug 10, 2022
Multimodal Machine Learning ApplicationsComputer Science27 citations
TL;DR

PAINT patches open-vocabulary models by linearly interpolating between zero-shot and fine-tuned weights to improve patching task accuracy while largely preserving performance on supported tasks, enabling multi-task patching and broad transfer.

ABSTRACT

Open-vocabulary models like CLIP achieve high accuracy across many image classification tasks. However, there are still settings where their zero-shot performance is far from optimal. We study model patching, where the goal is to improve accuracy on specific tasks without degrading accuracy on tasks where performance is already adequate. Towards this goal, we introduce PAINT, a patching method that uses interpolations between the weights of a model before fine-tuning and the weights after fine-tuning on a task to be patched. On nine tasks where zero-shot CLIP performs poorly, PAINT increases accuracy by 15 to 60 percentage points while preserving accuracy on ImageNet within one percentage point of the zero-shot model. PAINT also allows a single model to be patched on multiple tasks and improves with model scale. Furthermore, we identify cases of broad transfer, where patching on one task increases accuracy on other tasks even when the tasks have disjoint classes. Finally, we investigate applications beyond common benchmarks such as counting or reducing the impact of typographic attacks on CLIP. Our findings demonstrate that it is possible to expand the set of tasks on which open-vocabulary models achieve high accuracy without re-training them from scratch.

Motivation & Objective

  • Motivate the need to improve specific task accuracy without harming existing capabilities in open-vocabulary models.
  • Introduce a simple two-step patching method (PAINT) based on interpolation between pre-fine-tuned and post-fine-tuned weights.
  • Demonstrate patching effectiveness across multiple datasets and model scales, including multi-task and broad transfer scenarios.

Proposed method

  • Fine-tune a zero-shot model on the patching task to obtain ft weights.
  • Linearly interpolate between zero-shot and fine-tuned weights using a mixing coefficient alpha to obtain the patched model.
  • Choose alpha via held-out validation on both the patching and supported tasks.
  • Apply PAINT to multiple patching tasks via joint, sequential, or parallel strategies and compare performance.
  • Use CLIP ViT-L/14 and ViT-L/14 scale to study patching effectiveness and model similarity (CKA) as scale increases.

Experimental results

Research questions

  • RQ1Can interpolation between zero-shot and fine-tuned weights improve performance on patching tasks without degrading performance on supported tasks?
  • RQ2How does model scale affect the effectiveness and stability of weight interpolation patching?
  • RQ3Is it feasible to patch a single model on multiple tasks and how does it compare to task-specific models?
  • RQ4Does patching on one task yield broad transfer gains to related or even disjoint tasks?
  • RQ5What are practical case studies (e.g., typographic attacks, counting, VQA) where PAINT provides benefits?

Key findings

  • PAINT yields 15 to 60 percentage point improvements on nine patching tasks, while keeping ImageNet accuracy within <1 percentage point of the zero-shot model.
  • Patching effectiveness increases with model scale, with larger models showing closer alignment between unpatched and fine-tuned weights and representations.
  • A single patched model can match or approach the performance of multiple specialized models when patching on several tasks (average combined accuracy within ~0.5 percentage points).
  • Patch-based broad transfer improves related tasks even with disjoint class spaces (e.g., EuroSAT/RESISC45, MNIST/SVHN, etc.).
  • PAINT achieves robust gains in case studies: typographic-attack robustness improves by up to 41 points; counting on unseen numbers improves from 59% to over 99% with minimal ImageNet impact; VQA performance improves by ~18 points with minimal ImageNet drop.

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.