TiC-CLIP: Continual Training of CLIP Models

Saurabh Garg, Mehrdad Farajtabar, Hadi Pouransari, Raviteja Vemulapalli, Sachin Mehta, Oncel Tuzel, Vaishaal Shankar, Fartash Faghri

This post summarizes the paper "TiC-CLIP: Continual Training of CLIP Models," published at ICLR 2024.

TL;DR

TiC-CLIP introduces the first web-scale benchmarks for time-continual training of vision-language models, revealing that static foundation models like CLIP degrade significantly as the world evolves. The authors demonstrate that a simple rehearsal-based continual training approach can match the performance of retraining from scratch while being up to 4x more computationally efficient.

What Problem Does This Paper Address?

Large multimodal foundation models like CLIP are typically trained on massive, static snapshots of the web. However, the real world is in a state of constant change: new concepts emerge (e.g., COVID-19), and visual styles or definitions shift over time. A model trained on data up to 2020 might struggle with a retrieval task from 2022 because it has never seen the "new" world.

Currently, the standard practice for keeping these models up-to-date is to retrain them from scratch whenever a new pool of data arrives. This is prohibitively expensive, often requiring hundreds of thousands of GPU hours. The authors identify two major gaps: a lack of large-scale benchmarks to study this "Time-Continual" (TiC) problem and a lack of efficient methods to adapt models without full retraining.

Distribution of examples changes from 2014 to 2022, showing how novel concepts like COVID-19 emerge over time, making older models less effective.

Methods

The researchers propose a Time-Continual (TiC) training protocol. Instead of retraining from scratch (the "Oracle" approach), they explore several continual learning strategies:

  • Cumulative-All: The champion method. It initializes the model from the previous time-step's checkpoint (warm start) and trains on the union of all available data (new data + replayed old data).
  • Sequential: Training only on the new batch of data. While fast, this often leads to "catastrophic forgetting" of older concepts.
  • Replay Buffers (-Exp, -Equal): Strategies to reduce the amount of old data stored by subsampling, making the process more memory-efficient.

A key technical insight involves the Learning Rate (LR) schedule. While a linear warmup is essential for the very first training run, the authors found that using it for subsequent continual steps actually hurts performance. A cyclic cosine schedule without warmup for later steps proved most effective.

Experimental protocol: (A) Data aggregation with buffer constraints, (B) Continual training from checkpoints vs. scratch, and (C) Evaluation on static and dynamic tasks.

Datasets

The paper introduces three new web-scale benchmarks by augmenting existing datasets with "crawl-time" metadata:

  1. TiC-DataComp: The flagship dataset, containing 12.7 billion image-text pairs spanning 2014–2022.
  2. TiC-YFCC: A 15M subset of YFCC100M (2008–2014).
  3. TiC-RedCaps: 12M pairs from Reddit (2011–2020).

They also curated dynamic evaluation tasks (classification and retrieval) specifically designed to test a model's ability to handle data from different years, contrasting these with "static" benchmarks like ImageNet.

Key Insights and Ideas

  • Static Benchmarks are Deceptive: Standard evaluations like ImageNet accuracy suggest that older models (like OpenAI's original CLIP) are still robust. However, the new dynamic benchmarks reveal a significant "performance gap" on recent data that static benchmarks completely miss.
  • The "Timeless" vs. "Dynamic" Divide: Some categories are timeless (e.g., "bananas"), while others evolve rapidly. For instance, the visual definition of a "mask" shifted from masquerade-style to surgical-style during the pandemic.
  • Replay is Non-Negotiable: Simple sequential training fails because the model forgets. Replaying even a small amount of old data significantly stabilizes performance on both old and new tasks.
  • Compute Efficiency: Continual training provides a "free lunch"—matching the best possible performance of an Oracle at a fraction of the cost.
Dynamic and static evaluations rank models differently. OpenAI models show a clear performance gap on recent retrieval tasks despite looking robust on static benchmarks.

Key Results

  • Legacy Decay: OpenAI’s CLIP (trained up to 2020) loses approximately 8% zero-shot accuracy on retrieval tasks from 2021–2022 compared to models trained on more recent data.
  • Efficiency Gains: The "Cumulative-All" method achieves performance competitive with the Oracle while being 2.7x to 4x more computationally efficient.
  • Forgetting: Without replay (the Sequential method), models showed a performance drop of over 10% on older tasks compared to the Oracle.
Figure 1: (Left, Middle) OpenAI models show less zero-shot robustness on retrieval task from 2021–2022. OpenCLIP models and OpenAI models have similar robustness on standard benchmarks. However, OpenAI models show less robustness on our retrieval task when compared with recent models in OpenCLIP repository, highlighting susceptibility to a time-evolving data distribution (Right) Simple continual training baseline is computationally efficient and competitive to retraining from scratch. Different points denote models trained sequentially on our TIC-DataComp (L) as data arrives over time. Warm start training with previous checkpoint and replaying all old data, performs similar to Oracle which trains from scratch every time new data arrives, by using 2.7ˆ less compute.

Limitations and Future Work

The authors acknowledge several areas for future exploration:

  • Granularity: The current study uses yearly time steps; future work should explore monthly or even more frequent updates.
  • LR Schedules: While cyclic cosine works, there may be "forward-looking" schedules better suited for infinite data streams that don't require resetting the LR.
  • Data Filtering: Current filtering techniques (like CLIP-based filtering) can inadvertently bias datasets toward older concepts. Developing time-aware filtering is a priority.
  • Model Scope: The study focuses on CLIP; extending these findings to other large-scale architectures, such as Large Language Models (LLMs), is a natural next step.

Summary updated

Abstract

Keeping large foundation models up to date on latest data is inherently expensive. To avoid the prohibitive costs of constantly retraining, it is imperative to continually train these models. This problem is exacerbated by the lack of any large scale continual learning benchmarks or baselines. We introduce the first set of web-scale Time-Continual (TiC) benchmarks for training vision-language models: TiC-DataComp, TiC-YFCC, and TiC-Redcaps. TiC-DataComp, our largest dataset, contains over 12.7B timestamped image-text pairs spanning 9 years (2014-2022). We first use our benchmarks to curate various dynamic evaluations to measure temporal robustness of existing models. We show OpenAI's CLIP (trained on data up to 2020) loses $\approx 8\%$ zero-shot accuracy on our curated retrieval task from 2021-2022 compared with more recently trained models in OpenCLIP repository. We then study how to efficiently train models on time-continuous data. We demonstrate that a simple rehearsal-based approach that continues training from the last checkpoint and replays old data reduces compute by $2.5\times$ when compared to the standard practice of retraining from scratch. Code is available at https://github.com/apple/ml-tic-clip.
BibTeX
@inproceedings{garg2024tic,
  author = {Saurabh Garg and Mehrdad Farajtabar and Hadi Pouransari and Raviteja Vemulapalli and Sachin Mehta and Oncel Tuzel and Vaishaal Shankar and Fartash Faghri},
  title = {{TiC-CLIP: Continual Training of CLIP Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=TLADT8Wrhn},
}
Figure