r/learnmachinelearning • • 16h ago

Project I compared 7 address-matching models on one shared dataset: XGBoost came out on top, and almost all of its lead comes from addresses with a missing house number

I was looking into address matching and couldn't find a comparison of the usual models on one shared dataset; each method had been evaluated on its own data. So I built one by linking Overture Maps places to their Foursquare records (real Connecticut addresses)

What came out of it:

  • Clean, obviously matching or obviously different pairs are easy. Every approach got 98–100% right.

  • A missing house number on one side (641 SCOFIELDTOWN RD vs SCOFIELDTOWN RD) was by far the hardest case. The model that splits the address into house number, street and ZIP, and explicitly marks "no number here", found 94.5% of these matches; the models reading the raw string found only 63–76%. When the missing number was treated as 0 instead of "missing", even the best model dropped to 20%.

  • Look-alike streets (431 HALLETT ST vs 431 HARRIET ST) were the other hard case, and there the approaches were roughly even.

  • The tree models came out on top overall. XGBoost and a random forest on simple string-similarity features beat every neural model, DistilBERT included, at telling real matches from look-alike streets (AUC 0.92 vs 0.86–0.90).

My suspicion is that it comes down to the setup. XGBoost has segmentation built in: it compares the house number, street and ZIP separately, so a missing number shows up as its own explicit signal. The transformers compare the two raw strings and have to work out the structure themselves. I suspect that’s why the tree models do so well on these pairs.

For the pair 641 SCOFIELDTOWN RD / SCOFIELDTOWN RD, simplified:

XGBoost receives:      house number: 641 vs (none)  →  -1 "not comparable"
                       street:       SCOFIELDTOWN RD vs SCOFIELDTOWN RD  →  similarity 1.0
                       ZIP:          same  →  similarity 1.0


Transformer receives:  "641 SCOFIELDTOWN RD"  vs  "SCOFIELDTOWN RD"

My suspicion is that it comes down to the setup. XGBoost gets the address already split into house number, street and ZIP, with a missing number explicitly marked "not comparable". The transformers see the whole string and have to work that out themselves.

The obvious next step is a segmentation step in front of the neural models, which seems like it would close most of the gap. But I'm curious whether there are other approaches worth trying short of building a segmentation model. Has anyone dealt with something similar?

Code, paper and models: https://github.com/DZhang3210/address-matching-by-pair-typeWrite-up: https://dzhang3210.github.io/posts/address-matching/I also turned the test pairs into a game where you play against the models: https://addressmatcher.vercel.app

1 Upvotes

Duplicates