Khaos Record Matching
A DistilBERT cross-encoder that scores whether two table records describe the same entity. Records are serialized as column: value | ... pairs.
tab_entity_dedupe v1, from Khaos (a local-first library of pre-trained models for domain-specific tasks). This is the first release of the artifact.
Model
- Architecture: RecordMatcher: distilbert-base-uncased with a one-logit head on the first token, taking
[CLS] record A [SEP] record B [SEP] - Parameters: 66,363,649
- Format: ONNX (
model.onnx) plus PyTorch weights (model.pt) andmanifest.json - Training data: fletxcher/khaos-tab_entity_dedupe
Results
Measured on the held-out test split of the training dataset.
| Metric | Value |
|---|---|
| threshold | 0.6750 |
| test_f1 | 0.8750 |
| test_average_precision | 0.9457 |
| test_baseline_jaccard_f1 | 0.5928 |
| test_unseen_dataset_f1 | 0.5829 |
| test_unseen_dataset_average_precision | 0.7126 |
| test_unseen_dataset_baseline_jaccard_f1 | 0.3389 |
Results by benchmark
F1 at the validation-chosen threshold, against a token-Jaccard baseline with its own tuned threshold. test_unseen_dataset benchmarks were never seen in training.
| Split | Benchmark | Pairs | Khaos F1 | Jaccard F1 |
|---|---|---|---|---|
| test | Abt-Buy | 1916 | 0.804 | 0.019 |
| test | Amazon-Google | 2000 | 0.748 | 0.495 |
| test | DBLP-ACM | 2000 | 0.985 | 0.901 |
| test | DBLP-Scholar | 2000 | 0.965 | 0.917 |
| test | WDC-cameras | 1057 | 0.862 | 0.414 |
| test | WDC-computers | 1098 | 0.838 | 0.388 |
| test | WDC-shoes | 1084 | 0.764 | 0.373 |
| test | WDC-watches | 1012 | 0.840 | 0.404 |
| test_unseen_dataset | Beer | 91 | 0.824 | 0.651 |
| test_unseen_dataset | Fodors-Zagat | 189 | 0.978 | 0.407 |
| test_unseen_dataset | Itunes-Amazon | 109 | 0.806 | 0.593 |
| test_unseen_dataset | Walmart-Amazon | 2000 | 0.518 | 0.296 |
Training
{
"epochs": 3,
"batch": 32,
"lr": 3e-05,
"architecture": "RecordMatcher"
}
Best epoch 3, trained in 9.9 minutes on a single consumer GPU (RTX 3050 8 GB).
Intended use
Scoring candidate duplicate pairs produced by blocking; clusters are the connected components of confident pairs.
Limitations
- Trained on product, bibliographic, music and restaurant benchmarks; people and address matching is untested.
- Scores candidate pairs only: all-pairs comparison is quadratic, so blocking is needed.
- 256-token pairs.
Usage
pip install khaos
khaos serve ./tab_entity_dedupe
License
This model was trained on data with research-only, share-alike or mixed terms (see the training dataset card for each source). Treat it as research use and check the upstream data licenses before any commercial use.