Problem
Bank analysts often need to know whether a program changed customer behavior after the fact. Typical case: in which categories do clients spend more after taking a loan? Randomly giving loans to some people and not others is not possible, and a before/after comparison mixes the effect with other changes, such as clients who are keen on novelty joining the pilot, so the estimate cannot be trusted.
Example from the article: a new bank loyalty program is evaluated on two outcomes, customer satisfaction (target_1) and financial activity (target_2), using only observed participation (treatment).
Solution in brief
Pair every treated customer with the most similar customer from the non-participants (a "twin") and compare outcomes inside pairs. HypEx, an open-source Python library from Sber, does this in one Matcher(...).estimate() call. It uses FAISS for fast nearest-neighbor search in Mahalanobis distance and ships three built-in checks of the result.
Questions this case answers
- How to estimate the causal effect of an intervention on several outcomes when randomization is impossible and the treated group self-selected
- How to run nearest-neighbor matching with Mahalanobis distance on millions of rows without the search becoming too slow
- How to estimate the effect of a program or product change when an A/B test is impossible for legal, ethical or practical reasons?
- How to find a matched control group for every treated customer on a large dataset in reasonable time?
Tools and methods
- HypEx
Matcher— end-to-end matching, effect estimation (ATE, ATT, ATC) and quality checks - Nearest-neighbor matching — find the closest control twin for each treated unit
- Mahalanobis distance — similarity metric that accounts for correlations and scale of features
- FAISS — exhaustive nearest-neighbor search, used for speed
- Built-in result checks — random treatment, random feature, subsample re-estimation
Google or a one-time email code. No password.