Skip to main content

stabilization-uplift

Stabilization Score (SS) and Stabilization Uplift (SU): metrics for evaluating how stable a model's performance is under sudden distribution shifts, such as macroeconomic shocks.

Introduced in "Mitigating Model Drift in Developing Economies Using Synthetic Data and Outliers", NeurIPS 2025 Workshop on Generative AI in Finance (arXiv:2510.09294).

Installation

pip install stabilization-uplift

To also compute the distribution shift from data (requires SDV):

pip install "stabilization-uplift[shift]"

Metrics

Stabilization Score (SS) measures how much a model's ROC AUC changes between the base (pre-shock) and shock periods, normalized by the severity of the distribution shift:

$$SS = 1 - \frac{|AUC_{base} - AUC_{shock}|}{1 + \ln(1 + \text{shift})}$$

SS = 1 means the model's performance did not change under the shock.

Stabilization Uplift (SU) compares two models, A (e.g. a baseline) and B (e.g. trained with synthetic outliers). It is a weighted difference of their Stabilization Scores, where sigmoid weights distinguish a drop in AUC from a gain and favour the model with higher AUC. SU = 0 means B is not more stable than A; larger values mean a stronger uplift.

Distribution shift is the mean per-column shift between the base and shock data: Total Variation Distance for categorical columns and the Kolmogorov-Smirnov statistic for numerical columns.

Usage

from stabilization_uplift import stabilization_score, stabilization_uplift

# ROC AUC of model A (baseline) and model B on the base and shock test sets
auc_base_A, auc_shock_A = 0.80, 0.70
auc_base_B, auc_shock_B = 0.81, 0.78
dist_shift = 0.2

stabilization_score(auc_base_A, auc_shock_A, dist_shift)  # SS of model A
stabilization_score(auc_base_B, auc_shock_B, dist_shift)  # SS of model B
stabilization_uplift(auc_base_A, auc_shock_A, auc_base_B, auc_shock_B, dist_shift)  # SU of B over A

Computing the distribution shift from data, as in the paper:

import pandas as pd
from stabilization_uplift import distribution_shift

base_data = pd.concat([train_data, base_test_data])
shock_data = pd.concat([train_data, shock_test_data])
dist_shift = distribution_shift(base_data, shock_data)

The data used in the paper is available on Hugging Face: zyplai/stabilization-uplift. The experiments are in the GitHub repository.

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}
}

Credits

Author: zypl.ai

License

MIT

Metadata

Release files for stabilization-uplift 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stabilization-uplift 0.1.0
File Size Uploaded
stabilization_uplift-0.1.0.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stabilization-uplift 0.1.0
File Interpreter ABI Platform
stabilization_uplift-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / stabilization_uplift-0.1.0.tar.gz

Download URL stabilization_uplift-0.1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f54ca0a85c5a86600c5bfd1f199596967cd38a37066b77533ad877a5bec50140
BLAKE2b-256 checksum
How to use checksums
71bceff88cf567969510d09b90b37bde447e92bee527929ae958d12d50ea6d90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / stabilization_uplift-0.1.0-py3-none-any.whl

Download URL stabilization_uplift-0.1.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64c302a872afc7f18afca89e0928ea453f5d2f69f1d4a2e38e34cd66747b9aa3
BLAKE2b-256 checksum
How to use checksums
a74a6bf1b0463f51c2b608968a56ef12695490c6dbaed2bb2c2235daf7dc011b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page