Abstract
Twitter's Filtered Streaming API is a cornerstone of social media research, yet it silently subsamples data when keyword volumes exceed approximately 50 tweets per second. This study investigates the extent to which this sampling distorts research findings. By reconstructing a "complete" stream using a distributed crawling tool, we evaluate the accuracy of Twitter’s rate limit messages and the resulting biases in network and ranking metrics. Our findings reveal that while volume estimation is highly accurate, sampling is non-random at the millisecond scale and significantly skews user rankings and information cascade speeds.
Introduction
For over a decade, Twitter has served as a primary "model organism" for social media research. Most researchers access this data via the Filtered Streaming API, which tracks specific keywords or users. However, a critical limitation exists: if the tracked keywords generate more than ~50 tweets per second, Twitter subsamples the stream. This paper addresses a fundamental question: how much does this sampling distort our understanding of social phenomena? While previous studies questioned the reliability of Twitter's "rate limit" messages—which report the number of missed tweets—this research provides a rigorous re-evaluation across multiple temporal scales.
Methodology
To establish a ground truth, the researchers developed Twitter-intact-stream, a tool that bypasses API throttling by splitting a large set of keywords across multiple independent sub-crawlers. This allowed for the reconstruction of a "complete" stream without the prohibitive cost of the Twitter Firehose.
The study utilized two primary datasets collected over two weeks in late 2019:
- CYBERBULLYING: ~114 million tweets tracking 25 high-volume keywords related to online harassment.
- YOUTUBE: ~53 million tweets containing YouTube URLs.
The researchers compared the "complete" reconstructed stream against a "sampled" stream (simulating a single crawler) using Bernoulli processes to model tweet retention and Negative Binomial distributions to estimate true entity frequencies.
Fidelity of Rate Limit Messages
Contrary to earlier skepticism, the study finds that Twitter’s rate limit messages are remarkably accurate indicators of missing data volume. As shown in Figure 1, the Mean Absolute Percentage Error (MAPE) for estimating missing tweets was near zero (< 0.0005) across both datasets.
This high fidelity suggests that researchers can reliably use these messages to estimate the total volume of a conversation, even when the API is throttled.
Temporal Sampling Biases
While sampling appears random over long durations, analysis at the millisecond level reveals significant implementation artifacts. The sampling rate is not uniform; instead, it exhibits "bursty" behavior.
As illustrated in Figure 6(b), certain milliseconds (e.g., 657ms) consistently show a 100% capture rate, while others drop nearly all data. This non-randomness implies that automated bots could potentially time their activity to exploit these gaps, either ensuring their tweets are captured or intentionally evading the sampled stream.
Impact on Rankings and Network Analysis
The distortions introduced by sampling extend to higher-level metrics:
- Rank Distortion: Active users who tweet during high-volume periods are disproportionately penalized in rankings. By applying a statistical correction based on the Negative Binomial distribution, the researchers improved the correlation (Kendall’s $\tau$) between sampled and true user rankings from 0.73 to 0.85.
- Network Resilience: While the "core" of a social network remains relatively stable under sampling, the "fringes" and information cascades are severely affected. Retweet cascades appear significantly slower in sampled data; the median time between retweets jumped from 22.9 seconds in the complete set to 105.7 seconds in the sample.
Conclusion
This research demonstrates that while Twitter's volume reporting is trustworthy, the sampling process itself introduces systematic biases that can miscalibrate models of virality and social influence. Future social media research must account for these "sampling-aware" metrics to avoid underestimating the reach and speed of information flow.
Summary updated