lsynth
MAP-alignment fidelity and dataset distance for synthetic tabular data
This package implements the one-sided MAP-alignment fidelity statistic introduced by Chattopadhyay et al. and described in the manuscript “How Good Is Your Synthetic Data?”.
The core idea
For a synthetic record to be realistic, each coordinate should agree with the conditional MAP prediction inferred from real data.
Formally, for a data record x and coordinate i:
υ(x, i) = φ_i(x_i | x_{-i}) / max_y φ_i(y | x_{-i})
Averaged over samples and coordinates:
Υ(D) in [0,1]
High Υ: synthetic preserves real conditional structure
Low Υ: structural distortion (even if marginals / covariance match)
Installation
pip install lsynth
Interpretation
~1.0: synthetic matches conditional structure closely
~0.7: Gaussian-like distortions
< 0.7: strong structural mismatch
Why MAP-alignment?
Because covariance matching is insufficient.
Section VII of the manuscript gives explicit examples where:
Real and synthetic share identical means, variances, covariance matrices
Yet they differ strongly in conditional structure
MAP-alignment catches the discrepancy immediately
This method:
Detects nonlinear and higher-order structure
Avoids feature-embedding artifacts
Comes with finite-sample uncertainty control
Supported Generators
"LSM": use QuasiNet as a generative model via qsample
"BASELINE": independent-column null model
"CTGAN": uses SDV CTGAN synthesizer
Custom generators also supported
Citation
Chattopadhyay I, et al.
"How Good Is Your Synthetic Data?"
Metadata
Release files for lsynth 0.1.27
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lsynth-0.1.27.tar.gz | 12.9 kB | Without provenance | Details for lsynth-0.1.27.tar.gz |
Release files / lsynth-0.1.27.tar.gz
| Download URL | lsynth-0.1.27.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
464bc5d05232880d0e04b3d8ae7b0c06d2ff7b7cb9ec7686adea7f6059e6280b
|
|
BLAKE2b-256 checksum How to use checksums |
1075a5e11e60658f9c1ea122e7b62486e6d0532f03c300884fb84cefa99d30db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.12.7
|
Security for lsynth 0.1.27
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.