Drinking From a Firehose: Continual Learning With Web-Scale Natural Language

Hexiang Hu, Ozan Sener, Fei Sha, Vladlen Koltun

Abstract

Continual learning (CL) research has long been confined to small-scale, artificial benchmarks. This paper introduces Firehose, a massive 100-million-tweet dataset designed to evaluate CL in a realistic, non-stationary environment. We also present ConGraD, an adaptive optimization algorithm that utilizes an online validation buffer to dynamically navigate the stability-plasticity dilemma. Our results demonstrate that ConGraD outperforms existing CL methods at scale and on traditional benchmarks.

Introduction

The ability to learn continuously from a data stream without catastrophic forgetting is a hallmark of intelligent systems. However, the field of continual learning (CL) often relies on "toy" benchmarks like permuted MNIST, which do not reflect the complexity of real-world data. In production environments, such as social media streams, models must handle millions of users, shifting linguistic trends, and a constant influx of new information. This paper shifts the focus toward Personalized Online Language Learning (POLL) at a web-scale.

The Firehose Dataset

To facilitate research at scale, we introduce the Firehose datasets. Firehose100M contains over 100 million tweets from approximately 1 million users, spanning six years of data. This dataset is orders of magnitude larger than previous CL benchmarks and captures the natural non-stationarity of human communication.

Table 1: Statistics for the Firehose10M and Firehose100M datasets, highlighting the scale of users, tweets, and tokens.

The dataset is linguistically diverse, containing not only standard English text but also a high volume of mentions, hashtags, and emojis, which are critical for understanding social media dynamics.

Figure 1: Breakdown of total and unique tokens by category, illustrating the linguistic diversity of the Firehose dataset.

Methodology

Our approach combines architectural innovation with a novel optimization strategy:

  1. Transformer-XL with Residual Adapters: We use a high-capacity Transformer-XL backbone. To enable personalization for millions of users efficiently, we employ Residual Adapters—small, user-specific MLPs that modulate the model's activations without a significant increase in total parameters.
  2. ConGraD (Continual Gradient Descent): Standard online learning often suffers from a lack of plasticity. ConGraD addresses this by using a small FIFO validation buffer. For each incoming batch, the algorithm evaluates multiple gradient steps and selects the model state that minimizes loss on the validation buffer, effectively tuning the learning rate and step count on-the-fly.
  3. Temporal Streaming: Models are trained and evaluated in a chronological order, mimicking the real-world "firehose" of data.

Results and Discussion

Our experiments on Firehose100M show that ConGraD achieves a word perplexity of 115.6, a significant improvement over standard Online Gradient Descent (120.2). Furthermore, we found that personalization is a powerful tool; treating each user as a separate task reduced perplexity by 16.3% compared to a user-agnostic baseline.

On traditional benchmarks like Disjoint MNIST, ConGraD reached 86.2% accuracy, outperforming established CL methods such as GEM (81.4%) and iCARL (84.1%). This suggests that adaptive optimization is a versatile tool for various CL scenarios. A key insight is the "plasticity problem": many CL algorithms are so focused on preventing forgetting (stability) that they fail to learn new information effectively. ConGraD provides a mechanism to balance these competing needs.

Conclusion

The Firehose dataset and ConGraD algorithm represent a step toward more realistic and scalable continual learning. While a gap remains between online learners and offline "Oracle" models, our work demonstrates that adaptive optimization and efficient personalization are key to handling the massive, non-stationary streams of the real world.

Summary updated

BibTeX
@article{hu2020drinking,
  author = {Hexiang Hu and Ozan Sener and Fei Sha and Vladlen Koltun},
  title = {{Drinking From a Firehose: Continual Learning With Web-Scale Natural Language}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2020},
  doi = {10.1109/tpami.2022.3218265},
}
Figure