Abstract
In modern data-driven enterprises, recurring data pipelines are essential yet fragile. "Silent failures"—data quality issues that do not trigger system crashes—can significantly degrade downstream machine learning models and business intelligence. Manual authoring of data quality (DQ) constraints is unscalable, while existing automated methods often produce excessive false alarms. This paper presents Auto-Validate-by-History (AVH), a framework that automatically synthesizes DQ constraints by treating the task as a constrained optimization problem. By maximizing error detection (recall) while strictly limiting false positives (precision), AVH provides a scalable and interpretable "guardrail" for production data operations.
1. Introduction
Data pipelines power critical services ranging from e-commerce recommendations to financial reporting. These pipelines typically run on fixed schedules, processing new batches of data periodically. However, they are susceptible to various data quality issues, such as unexpected null values, unit changes, or schema drift. Unlike system errors, these data-level failures often go unnoticed, leading to "garbage in, garbage out" scenarios in downstream systems.
The current industry standard involves data engineers manually writing DQ constraints using frameworks like Amazon Deequ or Google’s TFDV. In large-scale environments with thousands of pipelines and millions of columns, manual intervention is impossible. Conversely, automated anomaly detection often treats data points as generic features, leading to high false-positive rates that cause "alert fatigue" among engineers.
2. The AVH Framework
AVH addresses these challenges by formalizing the generation of DQ constraints as a principled optimization problem: maximize the expected recall of data errors while ensuring the False Positive Rate (FPR) remains below a strict, user-defined threshold (e.g., 0.1%).
2.1 Statistical Invariants
Rather than relying on black-box machine learning models, AVH utilizes classical statistical properties to establish robust thresholds. By applying Chebyshev’s inequality, Cantelli’s inequality, and the Central Limit Theorem, the system can set constraints that are mathematically grounded. This approach allows AVH to function reliably even with limited historical data—requiring as few as seven days of history to generate effective constraints.
2.2 Managing Non-Stationarity
Real-world data is rarely static; it often exhibits trends or seasonality (e.g., increasing user traffic). To prevent these natural shifts from triggering false positives, AVH employs the Augmented Dickey-Fuller (ADF) test to detect non-stationary trends. If a trend is identified, the system applies time-series differencing to stabilize the data before calculating constraint thresholds.
2.3 Synthetic Error Injection and Optimization
To determine which constraints are most effective at catching potential failures, AVH uses a synthetic "training" phase. The framework injects 60 different types of synthetic DQ issues—such as character deletions, scaling errors, or null spikes—into historical data. It then evaluates which metrics most effectively identify these issues. Because finding the optimal set of constraints is NP-hard, AVH utilizes a greedy approximation algorithm with provable performance guarantees to select the best clauses for each column.
3. Experimental Evaluation
The researchers evaluated AVH using a massive dataset derived from Microsoft production pipelines, encompassing 2,000 pipelines (1,000 numeric and 1,000 categorical columns) tracked over 60 consecutive executions.
3.1 Benchmarking Performance
The system was tested against two primary benchmarks:
- Real-World Variation: Using "seed" columns to find similar variations in a data lake, treating these subtle differences as errors to be caught.
- Synthetic Injection: Testing the system against 10 common DQ failure modes (e.g., schema changes, null increases).
3.2 Key Results
AVH demonstrated significant improvements over 20 state-of-the-art methods, including commercial DQ tools and advanced ML models like LSTMs. Key findings include:
- High Precision and Recall: AVH consistently occupied the "top-right" of the precision-recall curve, maintaining high accuracy while strictly controlling false alarms.
- Operational Efficiency: The system is highly performant, processing a batch of 100,000 rows in approximately 1.6 seconds.
- Data Efficiency: Unlike traditional ML models that require extensive training data, AVH produced competitive results with only 7 to 14 days of history.
- Interpretability: AVH generates simple, human-readable DQ programs, typically consisting of only 2 to 3 clauses per column.
4. Discussion and Conclusion
The success of AVH highlights a shift toward "math-over-models" in DataOps. By exploiting the specific mathematical properties of data metrics rather than treating them as generic features, AVH achieves a level of precision necessary for production environments. The "precision-first" mandate is critical; in an enterprise setting, even a 1% false alarm rate can result in hundreds of daily interruptions, eroding trust in automated systems.
While AVH currently focuses on single-column constraints, it sets the stage for future work in multi-column correlations and complex cross-table dependencies. By treating history as a reliable "ground truth," AVH provides a scalable, automated, and explainable path forward for maintaining data integrity in the modern economy.
Summary updated