IlVarsh's picture
Card: recipe for building model A/B training mixes as in the paper; link metrics Space
22720cc verified
|
Raw History Blame Contribute Delete
8.99 kB
metadata
license: cc-by-4.0
pretty_name: Lending Club Model Drift Dataset with Synthetic Outliers
task_categories:
  - tabular-classification
tags:
  - finance
  - credit-scoring
  - model-drift
  - distribution-shift
  - synthetic-data
  - outliers
  - tabular
size_categories:
  - 1M<n<10M
configs:
  - config_name: lending_club
    default: true
    data_files:
      - split: train
        path: lending_club/train.parquet
      - split: base_test
        path: lending_club/base_test.parquet
      - split: shock_test
        path: lending_club/shock_test.parquet
  - config_name: synthetic
    data_files:
      - split: no_outliers
        path: synthetic/no_outliers.parquet
      - split: outliers_0_01
        path: synthetic/outliers_0_01.parquet
      - split: outliers_0_03
        path: synthetic/outliers_0_03.parquet
      - split: outliers_0_05
        path: synthetic/outliers_0_05.parquet
      - split: outliers_0_07
        path: synthetic/outliers_0_07.parquet
      - split: outliers_0_1
        path: synthetic/outliers_0_1.parquet
      - split: outliers_0_5
        path: synthetic/outliers_0_5.parquet
      - split: outliers_1_0
        path: synthetic/outliers_1_0.parquet
  - config_name: lending_club_full_train
    data_files:
      - split: train
        path: lending_club_full/train.parquet

Lending Club Model Drift Dataset with Synthetic Outliers

Data for the paper "Mitigating Model Drift in Developing Economies Using Synthetic Data and Outliers", accepted as a poster at the NeurIPS 2025 Workshop on Generative AI in Finance.

The dataset supports the study of model drift in credit scoring: models are trained on a stable period, evaluated before and after a macroeconomic shock, and compared with and without synthetic training data containing different proportions of synthetic outliers. Stability is measured with the Stabilization Score (SS) and Stabilization Uplift (SU) metrics introduced in the paper.

The paper also reports experiments on proprietary financial datasets from Central Asia and the Caucasus. Those datasets are confidential and are not included here; this dataset covers the experiments on the open Lending Club data.

Configurations

lending_club (default)

Preprocessed Lending Club loans enriched with macroeconomic features. These are the splits the paper experiments are drawn from.

Split Rows Issue dates Description
train 50,000 2007-07 – 2018-03 Random sample of the base training period
base_test 42,322 2016-10 – 2016-12 Test set from the stable (pre-shock) regime
shock_test 42,322 2018-04 – 2018-12 Test set from the shock period

112 columns: the original Lending Club loan attributes plus unemployment_rate, federal_funds_rate, year_month, region, emp_length_int, loan_condition and loan_condition_int.

How the paper experiments use these splits. The models are not trained on the full splits: the notebooks draw a random subsample of 4,000 rows from each of train, base_test, shock_test and the synthetic split with random_state=100 (8,000 rows in the notebook with LightGBM, NGBoost, TabNet, HGBoosting, XGBoost and FT-Transformer). Only the columns of the synthetic configuration are used: 21 features and the target for CatBoost and the other models (issue_d dropped), 22 features including issue_d for TabPFN.

import pandas as pd

REPO = "hf://datasets/zyplai/stabilization-uplift@v1.0"
columns = pd.read_parquet(f"{REPO}/synthetic/no_outliers.parquet").drop(columns="issue_d").columns
train = pd.read_parquet(f"{REPO}/lending_club/train.parquet")[columns].sample(n=4000, random_state=100)

Target: loan_condition_int (1 = bad loan, 0 = good loan). The columns loan_status and loan_condition are the same label in raw and text form and must not be used as features.

synthetic

Synthetic training data generated with zGAN on the Lending Club training data, each with 50,000 rows and 23 columns: 21 features, the issue date issue_d and the target loan_condition_int.

Split Description
no_outliers Synthetic data without synthetic outliers
outliers_0_01 … outliers_1_0 Synthetic data generated with the outlier proportion parameter 0.01, 0.03, 0.05, 0.07, 0.1, 0.5 and 1.0

In the experiments, a subsample of each synthetic split (same size and random_state as the real data: 4,000 rows, or 8,000 in the notebook with the other models) is concatenated with the real training sample to train model B, which is compared with model A trained on the real sample only.

lending_club_full_train

The full base training period (1,297,677 rows, same columns as lending_club), from which the train split was sampled. Provided for further research; it was not used directly in the paper experiments.

Usage

from datasets import load_dataset

real = load_dataset("zyplai/stabilization-uplift", "lending_club", revision="v1.0")
synthetic = load_dataset("zyplai/stabilization-uplift", "synthetic", revision="v1.0")

train = real["train"].to_pandas()
shock_test = real["shock_test"].to_pandas()
synth = synthetic["outliers_0_05"].to_pandas()

The notebooks reproducing the experiments are in the GitHub repository.

The SS and SU metrics are available as a Python package, stabilization-uplift, whose README includes an end-to-end example on this dataset:

pip install "stabilization-uplift[shift]"

Building the training data of models A and B as in the paper

The mixes of real and synthetic data used to train model B are not stored separately: they are built from the lending_club and synthetic configurations. This reproduces the notebooks (CatBoost and other models; for TabPFN keep issue_d, and the notebook with LightGBM, NGBoost, TabNet, HGBoosting, XGBoost and FT-Transformer uses N_SAMPLES = 8000):

import pandas as pd

REPO = "hf://datasets/zyplai/stabilization-uplift@v1.0"
N_SAMPLES, RANDOM_STATE = 4000, 100


def sample(data):
    return data.sample(n=N_SAMPLES, random_state=RANDOM_STATE)


columns = pd.read_parquet(f"{REPO}/synthetic/no_outliers.parquet").drop(columns="issue_d").columns
train, base_test, shock_test = (
    sample(pd.read_parquet(f"{REPO}/lending_club/{split}.parquet")[columns])
    for split in ("train", "base_test", "shock_test")
)

# Model A is trained on `train`. Model B is trained on a mix of `train` with one synthetic split:
mixes = {}
for split in ["no_outliers", "outliers_0_01", "outliers_0_03", "outliers_0_05",
              "outliers_0_07", "outliers_0_1", "outliers_0_5", "outliers_1_0"]:
    synthetic = sample(pd.read_parquet(f"{REPO}/synthetic/{split}.parquet")[columns])
    mixes[split] = pd.concat([synthetic, train]).reset_index(drop=True).drop_duplicates()

Both models are then evaluated on base_test and shock_test, and compared with the Stabilization Score and Stabilization Uplift.

Sources and License

  • Lending Club data. The lending_club and lending_club_full_train configurations are derived from the Lending Club dataset on Kaggle, released there under CC0: Public Domain. These files remain subject to the original dataset's license and terms of use.
  • Macroeconomic features. unemployment_rate and federal_funds_rate were obtained from FRED, Federal Reserve Bank of St. Louis.
  • Synthetic data. The synthetic configuration is licensed under CC BY 4.0 by zypl.ai.

Citation

@inproceedings{varshavskiy2025mitigating,
  title     = {Mitigating Model Drift in Developing Economies Using Synthetic Data and Outliers},
  author    = {Varshavskiy, Ilyas and Boboeva, Bonu and Khalilbekov, Shuhrat and Azimi, Azizjon and Shulgin, Sergey and Nizamitdinov, Akhlitdin and S{\'a}ez de Oc{\'a}riz Borde, Haitz},
  booktitle = {NeurIPS 2025 Workshop on Generative AI in Finance},
  year      = {2025},
  url       = {https://openreview.net/forum?id=zfTaFD0B5Z}
}

Authors

Ilyas Varshavskiy, Bonu Boboeva, Shuhrat Khalilbekov, Azizjon Azimi, Sergey Shulgin, Akhlitdin Nizamitdinov (zypl.ai), Haitz Sáez de Ocáriz Borde (University of Oxford, University of Cambridge).