Address matching by pair type: trained models

Trained weights of every neural run in the paper Address Matching by Pair Type: Segmented Classical Models versus Raw-String Neural Matchers (PDF): given two address strings, each model outputs a logit for "same location". Code (model definitions, training, the paper's tables): https://github.com/DZhang3210/address-matching-by-pair-type. Data: https://huggingface.co/datasets/zhangdav/address-matching-by-pair-type (config case2s).

These are the weights of the corrected version of the study. An earlier version was trained on data in which about 2% of the different-number non-matches had a house number on one side only; the pairs were rebuilt and every model retrained (paper, Appendix B). The earlier weights remain in this repository's commit history.

Runs

Folder Model Seeds
siamese/{mean,max}/seed_{0,1,2} Character-level siamese BiLSTM (char embedding 32 β†’ BiLSTM 1 Γ— 128 β†’ mean or max pooling β†’ head on `[ uβˆ’v
esim/{mc2,mc1,ft_mc1,rand_mc2,stack_mc1}/seed_{0,1,2} ESIM (frozen word vectors β†’ BiLSTM 200 β†’ soft alignment β†’ BiLSTM 200 β†’ mean + max β†’ MLP 200). Settings: word2vec min_count 2 (mc2, the reproduction), word2vec min_count 1, fastText min_count 1 (ft_mc1, the kept setting), word2vec min_count 2 + a fixed random vector per rare word, [word2vec; fastText] stacked 0, 1, 2
distilbert/bi/seed_{0,1,2} DistilBERT bi-encoder: each address alone, masked mean pooling, head on `[ uβˆ’v
distilbert/cross/seed_{0,1,2} DistilBERT cross-encoder: [CLS] A [SEP] B [SEP], masked mean + max pooling, MLP 200 0, 1, 2

Each folder holds model.safetensors (the state dict of the best epoch) and config.json (vocabulary for the siamese and ESIM models, settings, and the best epoch's validation numbers). ESIM's frozen embedding table is part of its state dict, so no word-vector files are needed. predictions/ has every run's validation/test probabilities, training histories and the rare-number group masks; the GitHub repo's results/paper_tables.ipynb reproduces the paper's tables from them.

All models were trained on the case2s train split with one protocol: binary cross-entropy, best epoch = most validation non-identical matches found among epochs that reject β‰₯ 98% of validation different-number pairs, early stopping. Threshold 0.5.

Results

Test set, % of each pair type classified correctly at 0.5, and the ROC AUC of non-identical matches against look-alike streets (paper, Table 15; min–max over three seeds; XGBoost, not in this repository, for reference):

Model Identical found Non-identical found Different number rejected Look-alike rejected Random rejected AUC, non-identical vs look-alike
n (pairs) 3,543 843 14,379 1,053 24,019
XGBoost (sentinel) 100 83.6 100.0 87.0 99.9 0.920
Siamese BiLSTM, mean pooling 100 87.0–89.3 99.9–100.0 69.8–73.1 99.5–99.8 0.878–0.893
ESIM, fastText 100 87.3–90.3 98.1–99.0 73.5–80.4 99.8–99.9 0.861–0.890
DistilBERT bi-encoder 100 89.0–90.9 99.8–99.9 57.6–68.8 99.8–99.9 0.883–0.893
DistilBERT cross-encoder 100 80.3–83.0 99.9–100.0 86.1–88.8 99.9 0.888–0.904

Usage

# from a clone of https://github.com/DZhang3210/address-matching-by-pair-type
import torch
from helpers.released import load_released

model, collate = load_released("distilbert", "cross", seed=0)      # downloads that run from this repo
pairs = [("12 ELM ST", "12 ELM STREET", 1), ("431 HALLETT ST", "431 HARRIET ST", 0)]
batch = collate(pairs)
with torch.no_grad():
    print(torch.sigmoid(model(*batch[:-1])))                        # P(same location)

Limitations

Trained on Connecticut addresses only, at the building level (units ignored), with labels from Overture's own Overture ↔ Foursquare matching. The neural models rank non-identical matches against look-alike streets about as well as the tree models once matches with a missing house number are set aside, but find only 63–76% of matches where one side has no house number, against 94–96% for the tree models. Not tested in a candidate-retrieval setting.

Data attribution

Trained on pairs built from Overture Maps Places (release 2026-09-23.1; CDLA Permissive 2.0 / Apache 2.0, see Overture attribution) and Foursquare Open Source Places (release 2026-09-15; Β© Foursquare Labs, Inc., Apache 2.0). The DistilBERT models are fine-tuned from distilbert-base-uncased (Apache 2.0).

Citation

@misc{zhang2026addressmatching,
  author = {Zhang, David},
  title  = {Address Matching by Pair Type: Segmented Classical Models versus Raw-String Neural Matchers},
  year   = {2026},
  howpublished = {\url{https://github.com/DZhang3210/address-matching-by-pair-type}}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for zhangdav/address-matching-by-pair-type

Finetuned
(12,902)
this model

Dataset used to train zhangdav/address-matching-by-pair-type