Introduction
In the era of large-scale machine learning, models are increasingly trained on data scraped from the internet or generated by users. This openness creates a significant vulnerability: data poisoning. Traditionally, defenses against poisoning have focused on the volume of malicious data, assuming that an attacker can only manipulate a small fraction (e.g., <1%) of the training set. However, in modern "unbounded" scenarios—where an adversary can deploy botnets or generative AI to produce an infinite stream of malicious samples—traditional count-based defenses collapse.
Presented at NeurIPS 2023, this research introduces a paradigm shift in model security. Instead of focusing on the count of poisoned samples, the authors propose focusing on the clock. By leveraging the timestamps of data collection, they develop a temporal threat model and a defense mechanism that provides provable robustness regardless of the volume of poisoned data.
The Temporal Threat Model
The core of this research is the observation that while an attacker can easily manipulate the content of a sample, they cannot easily manipulate its birth date—the specific time the system first collects or logs the data. This leads to two new metrics for characterizing attacks:
- Earliness: How long before the end of the data collection period did the attack begin?
- Duration: How long did the attack persist throughout the collection process?
By shifting the focus to these temporal constraints, the researchers can provide guarantees based on the physical constant of time rather than the variable of data quantity.
Defense via Temporal Aggregation
To mitigate the impact of time-constrained attacks, the authors propose Temporal Aggregation. This defense moves away from training a single monolithic model and instead utilizes an ensemble approach:
- Base Classifiers: The training timeline is divided into discrete periods (e.g., months). Multiple "base classifiers" are trained, each using a sliding window of $n$ periods, referred to as the base coverage.
- Inference via Majority Vote: At inference time, the system takes a majority vote from the $k$ most recent base classifiers, known as the aggregation size.
This structure ensures that a poisoning attack limited in time can only corrupt a subset of the base classifiers. As long as the majority of the classifiers in the ensemble remain unpoisoned, the final prediction remains robust and correct.
Empirical Evaluation: The News Category Dataset
To test this defense in a realistic setting, the authors curated a benchmark using the News Category Dataset, comprising approximately 192,000 HuffPost headlines from 2012 to 2017. This dataset is ideal for temporal modeling because it contains real-world timestamps and exhibits natural "distribution shifts" as news topics evolve over years.
The evaluation simulated a continuous learning environment where the model is updated monthly. Using a RoBERTa-based feature extractor, the base learners achieved a clean accuracy of 54.09% on the news classification task.
Key Findings
- Effective Robustness: Temporal Aggregation (with $n=1$ and $k=24$) successfully resisted attacks that started up to 8–11 months in advance or persisted for 6–9 months, with minimal impact on clean accuracy.
- The Robustness Trade-off: The research highlights a tension between accuracy and security. Increasing the base coverage ($n$) provides more data for each classifier, improving accuracy, but it also makes each classifier more vulnerable to a single poisoned time period.
- Provable Guarantees: Unlike empirical "cat-and-mouse" defenses, this paper provides mathematical proofs (Theorems 4.2 and 4.3) that define the exact temporal boundaries within which a prediction is guaranteed to remain stable.
Discussion and Limitations
While Temporal Aggregation offers a powerful new tool for security, it introduces certain trade-offs. The primary drawback is inference overhead, as running $k$ models for every prediction is more computationally intensive than running one. The authors suggest using shared feature extractors to mitigate this cost.
Furthermore, the defense's efficacy relies on timestamp integrity. If an adversary can compromise the logging system to backdate samples, the temporal defense is bypassed. However, in most production environments, securing a centralized logging server is a more manageable task than vetting millions of individual data points.
Conclusion
By treating time as a hard constraint, this research provides a path forward for securing models against the infinite-scale poisoning attacks of the future. Temporal metrics offer a formal framework for robustness that moves beyond sample counts, allowing developers to build systems that are resilient by design.
Summary updated