TL;DR
Commercial Machine Learning APIs (like those from Google, Amazon, and Microsoft) are often treated as static "black boxes," but they actually evolve silently over time, which can unexpectedly break downstream applications. HAPI (History of APIs) is the first large-scale longitudinal dataset tracking 1.76 million predictions from top-tier providers between 2020 and 2022. It reveals that these models shift far more frequently—and unpredictably—than users realize.
The Problem: Silent Shifts in MLaaS
Most developers treat Machine Learning as a Service (MLaaS) APIs as static utilities. You send an image to an OCR API, get text back, and assume the model's behavior is constant. However, providers constantly update these models to improve performance or reduce costs.
The authors identify a major gap: we have no systematic way to track these "API shifts." Because these models are proprietary, users don't know when an update occurs. A silent update might improve overall accuracy but suddenly fail on a specific demographic or change the meaning of "confidence scores." This lack of transparency can compromise the reliability of the entire software pipeline built on top of the API.
Methods and the HAPI Dataset
The researchers created HAPI, a dataset built by systematically querying commercial APIs from providers like Amazon, Google, IBM, and Microsoft over a two-year period. It covers 1,761,417 instances across six tasks, including classification (Spoken Command Recognition, Sentiment Analysis, Facial Emotion Recognition) and structured prediction (Multi-label Image Classification, Scene Text Recognition, Named Entity Recognition).
To quantify how these black boxes change, they introduced four key metrics:
- Prediction Overlap (PO): How often does the API give the exact same answer for the same input at two different times?
- Confidence Movement (CM): Does the API become more or "less sure" of its answers over time, even if the answer itself stays the same?
- Model Accuracy: Standard performance tracking against ground-truth labels.
- Group Disparity (GD): Tracking whether performance gaps between demographic subgroups (e.g., different accents or genders) widen or narrow after an update.
Key Insights and Ideas
Tracking these metrics over time revealed several surprising behaviors in commercial APIs:
- Confidence is Decoupled from Reality: In one striking example shown in the speech API trends above, the Microsoft API's average confidence score increased by 31.7% (CM) between 2020 and 2021, while its actual accuracy decreased. If an application automatically flags "low confidence" results for human review, a silent update like this could let more errors slip through undetected.
- Fairness is Volatile: Updates can inadvertently worsen biases. For example, Google’s speech API improved overall, but its performance gap (group disparity) between different accents actually widened over time.
- Bug Churn: The researchers found that the "prediction overlap" is often much lower than the change in accuracy. This means an update might fix 5% of errors but introduce 4% new errors. To the user, accuracy looks stable, but the specific failure points have shifted entirely.
- The "Accuracy Cross": API rankings aren't permanent. As illustrated above, in Fall 2020, EPixel was more accurate than Google for image tagging; by Spring 2022, Google had improved while EPixel's accuracy plummeted by roughly 20%, completely flipping their competitive positions.
Key Results
- Prevalence of Shifts: Over 60% of the 63 API-dataset pairs evaluated encountered significant performance shifts between 2020 and 2022.
- Accuracy Swings: While some shifts were minor, others were massive—like the aforementioned 20% drop in EPixel’s image classification accuracy.
- Price Stability vs. Model Instability: Interestingly, while the underlying models changed drastically, the prices for these APIs remained almost perfectly flat over the three-year period.
Limitations and Future Work
The primary limitation is that HAPI is a "reactive" dataset; it can tell us that a model changed, but because these are proprietary commercial products, it cannot tell us why (e.g., was it a change in training data, or a move to a smaller, cheaper model architecture?).
The authors plan to update HAPI every six months to keep the community informed. They suggest future research should focus on "unsupervised drift detection"—finding ways for developers to realize an API has changed without needing a labeled "gold standard" dataset on hand at all times.
Summary updated