How we took 1st place in the Matching task of Data Fusion Contest 2022, or how a neural net beat boosting

Ivan Kireev, Dmitry Babaev9 Jun 2022

Problem

A bank holds card transactions of its customers, and a telecom operator holds web clickstream of its own. There is no shared key. For each bank customer, the task is to list the 100 most likely telecom customers. About 16.6% of bank customers have no counterpart. Ranking is scored by R1, the harmonic mean of Precision@100 and MRR@100, over a pool of about 3,000 customers. Code had to run within one hour.

Example from the article: Data Fusion Contest 2022: anonymized, synthetic data from VTB and Rostelecom, with 15.4 million transactions and 94.8 million clickstream events.

Solution in brief

Two encoders turn a customer's transaction sequence and clickstream sequence into vectors in one space. They share a recurrent layer and are trained with a contrastive loss so that a person's two vectors are closer than vectors of different people. At inference, the 100 nearest telecom vectors are returned for each bank customer. The ensemble of networks gave the largest single gain.

Questions this case answers
  • How to link records of the same entity across two sources that share no keys and only describe it through different event sequences
  • How to build a cross-domain retrieval model from event sequences with few labeled pairs and a strict one-hour inference limit
  • How to find the same person in two companies' logs when one side has card transactions and the other has web clickstream?
  • How to turn two different event sequences (transactions, clicks) into comparable customer vectors?

Tools and methods

  • PyTorch-Lifestream — authors' library; supplies TrxEncoder
  • Contrastive loss — matched pairs end up closer than random pairs
  • Shared-weight GRU sequence encoder — compresses event vectors into one customer vector
  • Masked-vector pretraining — initializes the event encoders
  • Sequence augmentations — dropping repeats and random sub-sequences
  • Ensemble of seeds — averages distance matrices
Continue reading — it's free

Google or a one-time email code. No password.