Abstract
The distribution gap between training datasets and data encountered in production is well acknowledged. Training datasets are often constructed over a fixed period of time and by carefully curating the data to be labeled. Thus, training datasets may not contain all possible variations of data that could be encountered in real-world production environments. Tasked with building an entity resolution system - a model that identifies and consolidates data points that represent the same person - our first model exhibited a clear training-production performance gap. In this case study, we discuss our human-in-the-loop enabled, data-centric solution to closing the training-production performance divergence. We conclude with takeaways that apply to data-centric learning at large.
Introduction
Entity Resolution (ER) is the critical task of determining when two distinct records—such as "Jane Doe" and "J. V. Doe"—refer to the same real-world entity. While modern deep learning models achieve high performance on curated benchmarks, they often struggle in production environments where data is noisy and unpredictable. This paper details a case study in bridging the "training-production gap" by evolving a standard deep learning approach into a hybrid system that integrates human-in-the-loop (HITL) feedback and explicit symbolic rules.
Methodology
The development of the ER system followed an iterative, four-stage cycle guided by human review of production failures:
- V1 (Pure Deep Learning): A pretrained multilingual BERT model (
distilbert-base-multilingual-cased) was deployed as a binary classifier. While it outperformed the existing baseline, human analysis of 2 million unlabeled pairs revealed systematic failures regarding initials, nicknames, and "junk" words (e.g., "API", "Service Order"). - V2 (Data Augmentation): To address these failures, 10,000 augmented examples were added to the training set, alongside curated lists for nicknames and junk words. However, the model remained inconsistent across different name patterns.
- V3 (Rule-Prioritized Hybrid): Recognizing that some logic is difficult for neural models to learn from data alone, a "rules-first" approach was introduced. This integrated gender mapping (via Social Security data) and phonetic encoding (Metaphone) to reject matches with clear gender mismatches or low phonetic similarity.
- V4 (The Final System): The decision threshold was refined (raised from 0.5 to 0.7), and specific symbolic rules were added to override BERT's over-confident misclassifications in cases where exact names clearly did not match.
Datasets and Evaluation
The system was trained and evaluated using a diverse set of data sources. This included a manually annotated dataset of popular names across seven languages: English, French, German, Arabic, Russian, Spanish, and Portuguese. To provide robust negative examples, approximately 20,000 synthetic mismatch pairs were generated via rules like character deletion and insertion.
Furthermore, 2 million unlabeled name pairs from real customer data were used for the HITL phase to identify edge cases, supported by external knowledge bases including nickname lists (3,458 pairs) and junk word lists (1,570 words).
Results
The iterative refinement process led to significant performance gains. The final hybrid system (V4) achieved an overall F1 score of 98.79, a substantial improvement over the initial production baseline of 70.46 and the initial BERT model's 95.07.
As shown in the results, the system achieved near-perfect performance across all target languages, with particularly strong results in French (99.93 F1) and Arabic (96.65 F1).
Key Insights
- Rules as Data: Symbolic rules (e.g., gender consistency) should be viewed as precise expressions of data. Prioritizing these rules over fuzzy neural predictions can significantly increase robustness in production.
- Limits of Neural Purism: Deep learning models can be stubbornly inconsistent on edge cases even with heavy augmentation. A hybrid architecture that allows symbolic overrides provides a necessary safety net.
- HITL for Discovery: Human-in-the-loop processes are most effective when used to identify patterns of failure rather than just providing more labels. This allows for targeted architectural and data improvements.
Conclusion and Future Work
While the current system achieves high accuracy on name fields, future work will focus on incorporating contextual fields such as addresses, phone numbers, and emails to resolve remaining ambiguities. Additionally, resolving inherent tensions between conflicting rules (e.g., gender mismatch vs. sub-name match) remains an open area for optimization.
Summary updated