On Anytime Learning at Macroscale

Lucas Caccia, Jing Xu, Myle Ott, Marc'Aurelio Ranzato, Ludovic Denoyer

Abstract

In many practical applications of machine learning data arrives sequentially over time in large chunks. Practitioners have then to decide how to allocate their computational budget in order to obtain the best performance at any point in time. Online learning theory for convex optimization suggests that the best strategy is to use data as soon as it arrives. However, this might not be the best strategy when using deep non-linear networks, particularly when these perform multiple passes over each chunk of data rendering the overall distribution non i.i.d.. In this paper, we formalize this learning setting in the simplest scenario in which each data chunk is drawn from the same underlying distribution, and make a first attempt at empirically answering the following questions: How long should the learner wait before training on the newly arrived chunks? What architecture should the learner adopt? Should the learner increase capacity over time as more data is observed? We probe this learning setting using convolutional neural networks trained on classic computer vision benchmarks as well as a large transformer model trained on a large-scale language modeling task.

Introduction

In real-world machine learning deployments, data is rarely static. Instead, it often arrives in large sequential "mega-batches"—for instance, a language model updated with periodic web crawls or a vision system receiving batches of user-labeled images. Traditional online learning theory, largely rooted in convex optimization, suggests a "greedy" approach: update the model as soon as new data arrives. However, modern deep learning involves non-linear networks and multiple passes over data, which complicates this intuition.

The authors introduce the Anytime Learning at MAcroscale (ALMA) framework to address this. The goal is to maximize performance at any point in time while adhering to a fixed computational budget. This raises critical questions: Should you update immediately? Should you wait to aggregate data? Should the model's capacity grow as more data is seen?

The ALMA Framework

The researchers formalize a training procedure characterized by three main parameters:

  1. Waiting Time ($w$): The number of data chunks accumulated before a training update.
  2. Replay: The extent to which the model revisits previous data.
  3. Growth: Whether the model's capacity increases over time.

They evaluate several architectural strategies, including fixed-capacity Single Models (SM) and Ensembles (Ens), alongside growing architectures like Growing Ensembles (gEns), Growing Mixture of Experts (gMoE), and Firefly (FF).

Experimental Results

The Trade-off of Waiting

A key finding is the "Greedy Penalty." In non-convex deep learning, updating on every single chunk ($w=1$) can lead to worse long-term performance than waiting (e.g., $w=10$). Small chunks may trap the optimizer in poor local optima. Conversely, "tardy" models that wait until all data is collected achieve the best final accuracy but have zero utility during the data collection phase, creating a significant performance trade-off.

Figure 1: Performance tradeoff between immediate updates (greedy), periodic updates, and waiting for all data (tardy).

Architecture and Scale

The study reveals that starting with a large, fixed-capacity model is generally superior to growing one. Larger models exhibit higher "statistical efficiency," often outperforming smaller models even when the larger model has seen significantly less data.

Figure 4: Cumulative Error Rate (CER) across different architectures, compute budgets (TFLOPS), and parameter counts.

For large-scale tasks like language modeling, simple Ensembles (Ens) proved most effective. They are highly parallelizable and provide a robust performance floor throughout the learning process. The results show that for a given compute budget (TFLOPS), ensembles and larger models consistently achieve lower Cumulative Error Rates (CER).

Discussion and Future Work

The ALMA setting highlights that sequential learning is inherently more difficult than i.i.d. batch training. While current growing architectures did not outperform fixed ones, this may reflect limitations in existing growth algorithms rather than a fundamental ceiling. Future work could explore more efficient knowledge transfer or distillation methods to enable effective model growth. Additionally, while this study assumes a stationary distribution, real-world scenarios often involve "concept drift," which remains an open challenge for anytime learning at scale.

Reference: Caccia, L., et al. (2022). On Anytime Learning at Macroscale. Published at the 1st Conference on Lifelong Learning Agents (CoLLA).

Summary updated

BibTeX
@inproceedings{caccia2022anytime,
  author = {Lucas Caccia and Jing Xu and Myle Ott and Marc'Aurelio Ranzato and Ludovic Denoyer},
  title = {{On Anytime Learning at Macroscale}},
  booktitle = {CoLLAs},
  year = {2022},
  url = {https://openreview.net/forum?id=h6NbqbM6u8},
}
Figure