GraLMatch: Matching Groups of Entities with Graphs and Language Models

Fernando De Meer Pardo, Claude Lehmann, Dennis Gehrig, Andrea Nagy, Stefano Nicoli, Branka Hadji Misheva, Martin Braschler, Kurt StockingerarXiv 2024

In the world of data integration, determining if two records represent the same real-world entity—like a specific company or financial security—is a classic challenge known as Entity Matching (EM). While matching pairs of records is hard enough, real-world applications often require matching groups of records across dozens of sources. A new paper, "GraLMatch: Matching Groups of Entities with Graphs and Language Models," introduces a robust framework to tackle this "entity group matching" problem, specifically targeting the high-stakes, high-drift domain of financial data.

TL;DR

GraLMatch is an end-to-end framework that combines Transformer-based language models with graph-based cleanup algorithms to match entity groups across multiple data sources. By prioritizing pairwise precision and using graph properties to prune false matches, it prevents the catastrophic "merging" of unrelated entity groups caused by transitive relationships.

What Problem Does This Paper Address?

Most Entity Matching research focuses on comparing pairs of records from just two sources. However, in industries like finance, analysts must aggregate data from ten or more providers (e.g., Bloomberg, Reuters). This introduces two major hurdles:

  1. Transitivity: If record A matches B, and B matches C, then A, B, and C must all belong to the same group. While this helps find matches that lack direct evidence, it’s a double-edged sword. A single false positive match between two large groups can wrongly merge them into one giant, incorrect cluster.
  2. Data Drift: Real-world entities change. Companies merge, get acquired, or rebrand. These updates aren't applied uniformly across all data providers, leading to records that look different but represent the same evolving entity.

Standard EM benchmarks often ignore these multi-source, transitive complexities. As shown in Figure 2, matching naming variations like "Crowdstrike Plt." and "Crowdstrike Holdings" across sources is non-trivial, especially when similar-sounding but distinct entities like "Crowdstreet" exist.

Figure 2: An example dataset of companies (top part) and securities records (bottom part) to match across multiple data sources. Records #12, #22, #31 and #40 correspond to the same entity, "Crowdstrike". Record #12 can be matched to #31 because they have securities with a matching ISIN, US31807756E highlighted in orange. Equivalently with #22 and #40 with US318077DSIE highlighted in violet. Matching the entire group however, requires recognizing all of the different naming variations as equivalent (Crowdstrike Plt./Crowd Strike Platforms/ Crowdstrike Holdings etc.). This task is not trivial, since many false positive predictions are likely to happen with, for example, records #13, #23, #32 corresponding to the entity "Crowdstreet", due to the long shared character sequences across records.

Methods

The authors propose a multi-stage pipeline called GraLMatch (illustrated in Figure 1):

  • Blocking: Efficiently narrows down millions of possible pairs to a manageable set of candidates using identifier overlaps (like ISIN codes) and token-based similarity.
  • Pairwise Matching: Uses a fine-tuned DistilBERT model to classify candidate pairs as "Match" or "NoMatch."
  • GraLMatch Graph Cleanup: This is the core innovation. The records are treated as nodes in a graph, and predicted matches are edges. The algorithm identifies and removes "bridge" edges that are likely false positives using two graph-theoretic techniques:
  • Minimum Edge Cut (MEC): Finds the smallest set of edges whose removal disconnects a large, suspicious cluster.
  • Edge Betweenness Centrality (BC): Identifies edges that lie on many shortest paths between nodes, often indicating a weak link between two otherwise dense, correct clusters.
Figure 1: Illustration of the workflow of our entity group matching methodology.

Datasets

The study utilizes three main types of data:

  1. Real Financial Datasets: 65,000 human-labeled records of companies and securities from 8 different data sources.
  2. Synthetic Benchmarks: The authors introduced two new challenging datasets (Synthetic Companies and Synthetic Securities) that simulate real-world "data artifacts" like acronym swaps, mergers, and missing identifiers.
  3. WDC Products: A standard public benchmark for product matching to test the generalizability of the approach.

Key Insights and Ideas

  • Precision is King: In group matching, a high pairwise F1 score is deceptive. If recall is high but precision is slightly low, transitivity will propagate those few errors, ruining entire groups. The authors found that fine-tuning on fewer but higher-quality labels often yielded better final group results because it boosted precision.
  • Transitivity as a Discovery Tool: Transitivity is essential for finding matches affected by data drift. As shown in Figure 3, record #11 might only be linked to #41 through intermediate matches with #21 and #33.
  • Graph Structure as a Filter: False positive predictions often manifest as thin "bridges" between dense subgraphs. Graph cleanup algorithms are uniquely suited to spot these structural anomalies that a local pairwise classifier might miss.
Figure 3: Example of transitive matches between records of Figure 2. On the left side, the pairwise matches (#11 and #21), (#21 and #33) and (#33 and#41) imply the transitive matches of the right side colored in green (#11 and #33), (#11 and #41) and (#21 and #41).

Key Results

  • Massive F1 Boosts: On the Real Securities dataset, GraLMatch improved the final F1 score of a DistilBERT model from a failing state (due to false positive propagation) to a near-perfect 98.86%.
  • Efficiency vs. Scale: By using DistilBERT instead of larger models like Llama-2 (which took ~7 seconds per pair), the authors kept inference times practical for datasets with millions of candidate pairs.
  • Superiority over Baselines: GraLMatch consistently outperformed state-of-the-art baselines like DITTO on the complex synthetic and real-world financial datasets, primarily because DITTO’s encoding was less effective for identifier-heavy data and produced more false positives.

Limitations and Future Work

While powerful, GraLMatch currently relies on a fixed size threshold ($\mu$) for groups, assuming each entity appears at most once per data source. This works for financial providers but may fail for web-scraped data where an entity might appear multiple times in one source.

Future work includes developing more adaptive graph cleanup methods that can handle heterogeneous group sizes and incorporating external knowledge bases to better identify the specific types of real-world events (like mergers) causing data drift.

Summary updated

BibTeX
@misc{pardo2024gralmatch,
  author = {Fernando De Meer Pardo and Claude Lehmann and Dennis Gehrig and Andrea Nagy and Stefano Nicoli and Branka Hadji Misheva and Martin Braschler and Kurt Stockinger},
  title = {{GraLMatch: Matching Groups of Entities with Graphs and Language Models}},
  year = {2024},
  eprint = {2406.15015},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.15015},
}
Figure