ML

Matching 1.73M multilingual records in about 45 hours

Led a team of four: 0.9217 to 0.9825 in about 45 hours.

Role
Team lead
Context
Team
When
Sep 2026
Status
Competition entry, write-up, checked 26 Nov 2026
Reading time
5 min read

Details anonymised

Mine: Led a team of four from the first complete pipeline (25 Sep) to the final submission (27 Sep 2026)

Built with: Python, LightGBM, PyTorch, Hugging Face Transformers (multilingual MiniLM, XLM-RoBERTa-base), RapidFuzz, anyascii, NumPy, SciPy

Step chart of the public-leaderboard macro F0.5 rising from 0.9217 to 0.9825 over 11 uploads in about 45 hours, with two diagnostic uploads marked below the scale.

At a glance

  • 1,732,544 business entities in three countries (India, the US and France); France had no training labels.
  • 14,461,261 candidate test pairs after learned pruning, 8.35 per entity.
  • 11 public-leaderboard uploads in about 45 hours, 25-27 Sep 2026; two of them diagnostics.
Public-leaderboard macro F0.5
0.9217 → 0.9825 F0.5
MEASURED public leaderboard
Source: Public-leaderboard log (EVOLUTION.md at e2c4417), checked 26 Nov 2026
Validation macro F0.5, India / US
0.905 / 0.952 → 0.98767 / 0.98811 F0.5
MEASURED held-out 20% of training entities
Source: Headline numbers (EVOLUTION.md lines 15-20 at e2c4417), checked 26 Nov 2026
Candidates per entity
96-109 → 8.35
MEASURED test set, after learned pruning
Source: Headline numbers (EVOLUTION.md lines 15-20 at e2c4417), checked 26 Nov 2026

The problem

The test set held 1,732,544 business entities in one source. For each one, we had to find every matching record in two other sources. Names and addresses were noisy: transliterated from Indic scripts, misspelled, abbreviated, and padded with honorifics, aliases and legal suffixes. Training labels covered India and the US, but the test set added France, with no labels at all.

The metric was macro F0.5 per entity, so a false match cost more than a missed one. An entity with no true match scored 1.0 only for an empty list. The rules allowed no external data and no model above 8B parameters, and smaller candidate sets were preferred.

What I built

I led the team, and we built one pipeline that a single command runs from raw files to the final matches.

The matching pipeline. Six stages from raw records to matches. Rules normalise, block and select; LightGBM models prune and match; cross-encoders read the pairs the matchers are unsure about, plus France's near-certain matches.

Solid: rules · Dashed fence: model · Diamond: gate · Cyan: data

How it flows

  1. Normalise: rules repair spelling, scripts, aliases and legal suffixes, and a 1,376-entry lexicon learned from training pairs maps transliterated names back.
  2. Block: four IDF-weighted token channels plus exact-key joins find about 96-109 candidates for each entity.
  3. Prune: a LightGBM model keeps at most 12 candidates per entity, 8.35 on average across the test set.
  4. Match: an ensemble of LightGBM matchers scores each pair, and a stage-2 stacker reads the competition among an entity's candidates.
  5. Rescore: four fine-tuned multilingual cross-encoders read both raw records for pairs the matchers put between 0.02 and 0.98, and one of them rechecks France's near-certain matches.
  6. Select: for each entity, keep the list that maximises expected F0.5 (the empty list included); each record goes to at most one entity.

Rules come first. They repair leetspeak, aliases, repeated tokens and legal suffixes, and a 1,376-entry lexicon learned from training pairs maps transliterated names back to one spelling.[4] Blocking then finds candidates through four IDF-weighted token channels and a few exact-key joins.

A LightGBM pruning model cuts each entity’s list to at most 12 candidates. An ensemble of LightGBM matchers scores every remaining pair, and a stage-2 stacker reads how an entity’s candidates compete with each other. France had no labels, so its matchers were trained without the vocabulary features that India and US labels taught. Small France-only normalisation tables were mined without labels from confident French pairs, and India and US records normalise exactly the same with or without them.

Four fine-tuned multilingual cross-encoders then read both raw records for the pairs the matchers left between 0.02 and 0.98, and one of them rechecks France’s near-certain matches.[7] A selection rule keeps, for each entity, the list with the highest expected F0.5, the empty list included, and gives each record to one entity at most.

The candidate funnel. Candidates per entity on the test set, before and after learned pruning. Every later stage scores only the pairs left at the end.

Solid: rules · Dashed fence: model · Diamond: gate · Cyan: data

How it flows

  1. Each of the 1,732,544 test entities can match any record of its own country in the two other sources.
  2. Blocking keeps about 96-109 candidates per entity: about 165M test pairs in all.
  3. A LightGBM pruning model keeps at most 12 per entity. On training data it kept 99.87% (India) and 99.90% (US) of the true pairs blocking found.
  4. The candidate set: 14,461,261 test pairs, 8.35 per entity, down from about 96-109.

The funnel carries the main idea: the candidate set got far smaller and the score still went up.[6]

Key decisions

Three choices shaped the work. Each was settled by a measurement, not a hunch.

Prune the candidate set with a learned model

Alternative rejected
Keep all of blocking's 96-109 candidates per entity and let the matchers sort them out.
Why
Smaller candidate sets were preferred, and group features recomputed on a small, clean set were far less sensitive to the test set's extra look-alikes. Pruning to at most 12 kept 99.87% (India) and 99.90% (US) of the true pairs blocking found, on training data. Validation did not measurably change, and the public score rose from 0.968 to 0.978.

Small fine-tuned encoders, not a large general model

Alternative rejected
Ask a zero-shot 7B instruction-tuned model (Qwen2.5-7B-Instruct) whether two uncertain records are the same business.
Why
It reached an AUC of 0.60 to 0.65 on the uncertain pairs, against 0.83 to 0.86 for our ensemble, so we dropped it. Encoders of about 118M and 278M parameters, fine-tuned on the task's own pairs, learned the look-alike pattern instead.

Cross-fitted blends with a minimum gain

Alternative rejected
Fit the blend weights on all validation entities and score them on those same entities.
Why
Weights scored on the entities they were fitted on overstate the gain. We fitted on one half and measured on the other, both ways round, and a group used a new blend only if its mean gain beat +0.0001.

The pruning decision started as a size target and became the largest public gain of the last day.[6] The rejected model stays in the write-up with its numbers.[7]

All three follow one habit: a new component had to beat a measured baseline on held-out data before it joined the pipeline. The ideas that did not, such as extra recall joins for lost copies and a fixed decision threshold for the US, are listed as failures in the same log.

How it was proven

We judged every change on validation first. Validation was a fixed, held-out 20% of training entities, scored with macro F0.5 per country.[3] It rose from 0.905 (India) and 0.952 (US) at the baseline to 0.98767 and 0.98811 at the end. France has no labels, so validation could never see it.

The public leaderboard was the only check on the real test set. It scored part of the test set and showed three decimals. Our 11 uploads span 45 hours and 16 minutes, from 25 Sep 22:22 to 27 Sep 19:38 IST.[1][2]

The Climb: public-leaderboard score per upload. All 11 uploads in upload order, about 45 hours from first to last. The step line joins the nine results; the two diagnostic uploads sit off it, below the scale. Where the board showed three decimals, the table pads to four. MEASURED measured Source: Public-leaderboard log (EVOLUTION.md at e2c4417), checked 26 Nov 2026
Data table
The Climb: public-leaderboard score per upload
Upload time (IST) Public-leaderboard macro F0.5 Note
25 Sep 22:22 0.9217 Baseline: the first complete pipeline
26 Sep 14:30 0.9507 Upgrade 2: clone-aware features, hard negatives
26 Sep 20:26 0.9673 Upgrade 6: stage-2 stacker, same-name join
26 Sep 22:38 0.8380 Diagnostic, not a result
26 Sep 23:23 0.1860 Diagnostic, not a result
26 Sep 23:35 0.9680 Stage 2 for France; board showed 0.968
27 Sep 08:22 0.9780 Upgrade 7: learned pruning; board showed 0.978
27 Sep 11:29 0.9780 Upgrade 8: matcher ensemble; board showed 0.978
27 Sep 14:44 0.9780 Upgrade 10: first cross-encoder; board showed 0.978
27 Sep 16:27 0.9820 Upgrade 10b: two cross-encoders; board showed 0.982
27 Sep 19:38 0.9825 Upgrade 10d: four cross-encoders and a France recheck, the final system

Note

Validation covered only India and the US, so we spent two uploads on blanked submissions to find where the test loss sat. The diagnostic uploads scored 0.838 with every France row blanked and 0.186 with every India and US row blanked. A blanked entity scores 1.0 only if it truly has no match, so together they showed France at about 0.92 and India plus the US at about 0.975.[5] They are measurements of the gap, never results, and the chart keeps them off the step line.

From then on, every change was also judged by what it could do for France. The board stayed at 0.978 for three uploads in a row: Upgrades 8 and 10 improved validation, but by less than the board’s third decimal. Adding a second cross-encoder then lifted it to 0.982, more than validation predicted, which points to France as the main gainer.

The final system scored 0.9825. It wrote 1,732,544 rows, every match drawn from the 14,461,261 candidate pairs, and passed the organisers’ validator.[6]

Outcomes

The public score climbed from 0.9217 to 0.9825 over 11 uploads in about 45 hours. Validation macro F0.5 reached 0.98767 for India and 0.98811 for the US.

Candidates per entity fell from about 96-109 to 8.35, or 14,461,261 test pairs, without a measurable cost on validation. Token accuracy on transliterated names: 45% → 92%, with the learned lexicon.[4]

Two lessons stayed with me. First, measure on the real distribution: our early slices hid the look-alike problem that turned out to be the largest error source. Second, find where the errors sit before building more: that pointed our last day at the uncertain pairs, and that is where the cross-encoders went first.

Limitations and what I’d change

  • France was never measured directly: its score comes from two diagnostic uploads and from how the board moved, so the France gains are inferred. I would run those diagnostic uploads on the first day, not the second.
  • The board scored only part of the test set and showed three decimals, so small validation gains were invisible there. I would decide in advance which validation gain is worth an upload.
  • Our early development slices sampled distractors at 1 in 15, which hid the look-alike problem until we ran on full data. I would measure on the full distribution from the first day.

Credits and permissions

Built with a team of four; names withheld. I led the team; the work on this page was a team effort.

The teammates and the organiser stay anonymous, and no code or data from the challenge is published. Every receipt is cropped or rendered so that it shows no names, team header, branding or browser chrome.

Details anonymised: names, brands and identifying links are withheld.

  1. Public-leaderboard log (EVOLUTION.md lines 26-40 at e2c4417), checked 26 Nov 2026
  2. Submissions panel, cropped (images/final_score_0.9825.png at e2c4417), checked 26 Nov 2026
  3. Headline numbers and the validation set (EVOLUTION.md lines 15-20 and 44 at e2c4417), checked 26 Nov 2026
  4. Normalisation upgrade (EVOLUTION.md lines 76-78 at e2c4417), checked 26 Nov 2026
  5. The diagnostic uploads (EVOLUTION.md lines 109-117 at e2c4417), checked 26 Nov 2026
  6. Learned pruning and the candidate set (EVOLUTION.md lines 125-130 and 288 at e2c4417), checked 26 Nov 2026
  7. The rejected 7B model, the cross-encoders and the France recheck (EVOLUTION.md lines 166-174, 180, 220-223, 250-253 and 287 at e2c4417), checked 26 Nov 2026

Contact

Have a project?

Open to a small amount of freelance work: AI features, internal tools and web apps for small teams. Tell me what you're building, who it's for and when you need it.

Write to me →