Resolving 12 Million Business Records in 72 Hours: Our Amazon ML Challenge 2026 Journey
How our team matched 1.7M reference businesses against 10M noisy records using linear-time blocking, XGBoost, a fine-tuned cross-encoder re-ranker and a stacker, reaching 0.9817 macro F0.5 and the top 9% of 10,942 teams. Plus the lessons that mattered most: reading errors, calibrating for the train–test shift, and validating before submitting.
The problem
Amazon ML Challenge 2026 was a 72-hour business entity resolution challenge. Three sources describe the same real-world businesses:
- Source 1: a clean, deduplicated reference list (2.2M records in train, 1.7M in test)
- Sources 2 and 3: ~10M noisy copies, with typos, abbreviations, reordered addresses, missing fields, legal-suffix changes, Indic-script transliterations and domain-style names
For every Source 1 record, we had to return the list of matching Source 2/3 records.
- Metric: macro F0.5, averaged per Source 1 entity. Precision counts twice as much as recall, and a record with no true match scores 1.0 only if you predict nothing for it.
- Twist: the test set added France, a country that never appears in training. Every rule had to be format-based, never country-based.
Why it's hard
- Scale: comparing 1.7M × 10M pairs is 17 trillion comparisons, so blocking must be linear.
- Noise: "Pvt Ltd" vs "Private Limited", "8angalore", "0016 R. Bremontier" vs "15 Rue Brémontier", names written in 9 Indic scripts.
- Decoys: the data contains look-alike businesses, often the same name on the same street at a neighbouring house number.
- Ambiguity: about a third of address-less records share their exact name with two or more reference businesses.
The architecture
normalize + transliterate │rare-token blocking ───────────────► 80 candidates / record (98.3% of true pairs kept) │96 features + XGBoost (learned filter) ─► 4.6 candidates / record (99.93% of those kept) │fine-tuned cross-encoder (bge-reranker-base, 2 folds) + MiniLM second opinion │stacker (scores + rival margins + house-number relation) │one-owner-per-record rule + test-calibrated threshold ─► matches1. Normalization that understands the noise
- Transliteration: a rule table for 9 Brahmic scripts plus a 1,311-word dictionary learned from the training pairs. On held-out native-script pairs, mean name similarity went from 6.3 (accent stripping) to 96.9.
- Format fixes: domain-name word segmentation ("goodwatsonbelcher.com" → "good watson belcher"), look-alike digits, "id 47182" tags, honorifics, ordinals, zero-padded house numbers, and French formats (N°, elisions, St/Saint), all learned or rule-based from the provided data only.
2. Blocking that scales linearly
- Each record becomes a set of hashed keys: name tokens, order-free token pairs, name without spaces, address tokens, house number × street word, and so on.
- Candidates are scored by summed IDF over shared keys. Keys that appear in thousands of records ("road", "restaurant") are ignored, which keeps the work linear.
- Four passes are unioned: all keys, name keys only (for address-less records), address keys only (for replaced or foreign-script names), and a character-trigram pass for address-less records with typos.
- Result: 98.3% of true pairs survive in 80 candidates per record.
3. Features that encode how the data was generated
Reading the errors taught us the most. The generator's decoys sit at neighbouring house numbers, while true copies keep the number, truncate it (932 → 32) or drop it. Among similar-name candidates:
House-number relation | Share that are true matches |
|---|---|
equal | 99.5% |
one is a prefix/suffix of the other | ~50% |
different in any other way | 2–4% |
So we built house-number relation features (equal / truncated / neighbouring / distance). They cut decoy false positives by 39%.
Other features:
- Raw-spelling tie-breakers, so chains with identical normalized names can be told apart.
- Reverse ranks: how this reference record ranks among all records claiming the same target.
- The usual TF-IDF, token overlap and fuzzy-matching scores.
XGBoost on 96 features reached 0.9816 out-of-fold (2-fold by entity, all 2.2M training records).
4. A cross-encoder where decisions are hard
A pretrained cross-encoder reads both records as text:
name | address [SEP] name | address . We fine-tuned BAAI/bge-reranker-base (MIT licence, 278M parameters) on the uncertain band, i.e. pairs the first stage scored at p ≥ 0.02.- Cross-fitted: two models, each trained on half the entities (split by name cluster, so same-name competitors stay together) and scoring the other half. Every training pair gets an honest score.
- A stacker (XGBoost) combines the first-stage score, the cross-encoder logit, the margin over the best rival record claiming the same target, and the house-number relation. The cross-encoder reads "26 rue Dadé" and "27 rue Dadé" as near-identical text; the stacker knows better.
- A second opinion: an English MiniLM cross-encoder trained earlier on small samples, added as extra stacker inputs.
Stage (out-of-fold, all training entities) | Macro F0.5 |
|---|---|
XGBoost first stage | 0.9816 |
+ cross-encoder, logistic-regression combiner | 0.9852 |
+ cross-encoder + stacker | 0.9877 |
5. Test isn't train: calibrating the threshold
Our first re-ranked submission gained far less on the leaderboard than validation promised. The reason: about 26% of training records have no owner, but about 40% of test records don't. Their owner isn't in the test reference list at all, so they become distractors for look-alike businesses.
The model's probabilities were calibrated to train, so we probed the decision threshold on the leaderboard. It's one global number, never per-country.
Threshold (combined score) | Public leaderboard |
|---|---|
0.65 (train optimum) | 0.967 |
0.85 | 0.971 |
0.92 | 0.970 |
0.96 | 0.967 |
That was +0.004 for free. With the stronger final stacker the best shift was smaller: 0.70 on train became 0.75 on test.
The results
Step | Public leaderboard |
|---|---|
First end-to-end run | 0.955 |
+ house-number features, cleanup | 0.966 |
+ MiniLM re-ranker, test-calibrated threshold | 0.971 |
+ better blocking and raw-spelling features | 0.973 |
+ bge cross-encoder on the full band + stacker | 0.9814 |
+ two folds averaged, MiniLM second opinion, final threshold | 0.9817 |
The candidate set matters too. The challenge ranks smaller candidate sets higher. Only 4.6 candidates per record reach our final model, a 17× reduction from blocking, while keeping 99.93% of the true pairs.
What didn't work (and how we knew without wasting submissions)
Every idea was checked out-of-fold on ~2M training entities before it cost a submission:
Idea | Effect | Decision |
|---|---|---|
Per-entity expected-F0.5 decisions instead of one threshold | −0.001 | dropped |
Simulating absent owners by hiding records after scoring | didn't reproduce the test shift | dropped |
"Sibling" features (similarity to the entity's other matches) | +0.0001 | dropped |
Deeper, slower or seed-averaged stackers | ±0.00002 | dropped |
Separate thresholds for an entity's first link vs extra links | +0.00003 | dropped |
Engineering lessons from 12M records on modest hardware
We ran on Google Colab (A100/L4) and a laptop with a 6 GB GPU, not a big cluster. Most of our lost time was infrastructure:
- Memory: a 176M × 96 feature matrix doesn't fit in RAM as float64. We used a float16 memory-mapped matrix filled block by block. It showed no measurable loss against float32.
- Checkpoint everything: normalization, blocking and features were cached per country, so runtime disconnects and out-of-memory kills cost minutes instead of hours. A
--final-onlymode refits the final model from cached features.
- Samples lie: blocking recall on a 5% sample looked great and collapsed at full density. Measure at full scale.
If we did it again on AWS
- Amazon SageMaker Processing jobs for normalization and blocking, sharded by country, with Amazon S3 holding every checkpoint instead of a notebook's disk.
- SageMaker Training on
ml.p4d/ml.g5instances (Spot for the long jobs) to fine-tune the cross-encoders in 5 folds instead of 2.
- One big instance for the feature/XGBoost stage, so a full run takes ~1 hour instead of 4–5. Iteration speed was our real bottleneck.
- Next modelling steps:
- match Source 2 ↔ Source 3 records to each other and cluster them, so groups of copies whose owner is absent get rejected together (the largest remaining error);
- a multilingual bi-encoder for dense retrieval as an extra blocking pass;
- hard-negative training for the cross-encoder.
Key takeaways
- Scale first, then quality. A pipeline that finishes beats a clever one that doesn't.
- Read your errors. The decoy house-number pattern was worth more than any hyperparameter.
- Use pretrained models where decisions are hard. The cross-encoder on the uncertain band gave our biggest single jump.
- Validate honestly. Cross-fitting and out-of-fold checks let us reject five ideas without spending a submission.
- Check how test differs from train, early. A single threshold was worth +0.004.
We didn't make the top 50, but every lesson above came from measuring rather than guessing, and that's what we'll carry into the next one. Congratulations to the top 50 teams.
Team NotAiSlop, Amazon ML Challenge 2026.
Tags: #MachineLearning #EntityResolution #AmazonMLChallenge #XGBoost #Transformers #SageMaker
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article