Skip to main content

Practical Guide to Synthetic Data for Sharing

A cookbook for microdata teams and methodologists in national statistical organizations. Version 0.1 (working draft), October 2026.

Working draft

This guide is a working draft from the AI for Data – Data for AI program. It collects practical approaches and open standards. It does not represent official World Bank Group guidance or policy and is not legal advice; an organization applies it under its own statistical law, data protection rules, and institutional policies. Comments and corrections are welcome as GitHub issues, and the contributing page explains how to propose a recipe.

Microdata are the most requested and the least shareable product a statistical organization holds. Every applicant for a licensed file waits, then discovers on the real file what the documentation did not say. Students, developers, and partners who cannot receive the real file receive nothing. A synthetic file, generated by a model fitted to the real microdata so that it has the same shape and similar relationships while containing no real record, answers these needs: code is written and tested before the application, teaching has a realistic file, pipelines have test data, and partners have something to work with. It does not answer the need for estimates, and this guide keeps that line.

This guide is organized around seven questions. The first settles what synthetic data are for and what they are not for. The next two are about making a file: which synthesis method fits the data, and how multi-table and longitudinal data are synthesized. Two are about measuring it: how utility is measured, and how disclosure risk is measured. The last two are about releasing it: how a release is documented and governed, and how synthetic data enter the access and analysis workflow. Each chapter answers one question with recipes, maturity levels, worked examples, and a checklist.

The recipes build on the program's synthetic data workstream, whose REaLTabFormer generates tabular and relational synthetic data with a built-in control on memorization, on the sequential synthesis methods established in official statistics (synthpop), and on the disclosure control practice of the sdcMicro practice guide. The standards page lists each and where it applies.

Three rules for synthetic files

Three rules run through the guide: every synthetic file has a utility report and a risk review before release; every file is labelled synthetic in its name, its record, and its data; and no statistic is published from one. A synthetic file that meets the three is a service; one that misses any of them is a risk.

Prerequisites​

The recipes assume the following are in place or can be arranged:

  • A microdata file users request often, its documentation, and the unit that owns it.
  • A methodologist with R or Python, and the disclosure control unit that sets the limits.
  • For the AI-ready level, a server inside the organization to run the synthesis and the reports; for generators, a GPU.

First steps​

For a team with limited time, this sequence gives the most useful result first:

  1. Write the purpose statement of chapter 1 and choose the one survey to start with. This takes half a day.
  2. Synthesize it with a sequential method, with the seed recorded, following chapter 2. This takes a day.
  3. Run the utility report and the risk report of chapters 3 and 4, and fix the method until both pass the limits. This takes one to three days.
  4. Write and check the synthesis record, label the file, and release it beside the real survey with a guidance note, following chapters 6 and 7. This takes a day.

Relational and panel data (chapter 5) come after the first single-table file has users.

Self-assessment​

The self-assessment takes about five minutes and places a microdata team's synthetic data practice at a level in each chapter.

Chapters and questions​

ChapterQuestionPractical topics
1. Purpose and limits of synthetic dataWhat are synthetic data for, and what are they not for?Purpose statement, demand, fully versus partially synthetic, labelling
2. Choice of synthesis methodWhich synthesis method fits the data?Sequential CART, copulas, generators, transformer-based synthesis, seeds and parameters
3. Measurement of utilityHow is the utility of synthetic data measured?Marginals, associations, target analyses, thresholds
4. Measurement of disclosure riskHow is the disclosure risk of synthetic data measured?Exact copies, closest-record distance, attribute inference, limits, membership inference
5. Relational and longitudinal dataHow are multi-table and longitudinal data synthesized?Relational generators, integrity and structure checks, panels wave by wave
6. Documentation and releaseHow is a synthetic release documented and governed?Synthesis record, catalog record and label, licence, release decision
7. Synthetic data in the access workflowHow do synthetic data enter the access and analysis workflow?Placement, guidance and switch-over, measured effect, tracked use

Maturity levels​

Each chapter describes three levels. A team can sit at different levels in different chapters, and the first level is a complete, useful state on its own.

LevelMeaning
FoundationalOne synthetic file produced with a sequential method, measured, labelled, documented, and offered beside the real survey.
AI-readySynthetic files for the main surveys with methods chosen by rule, utility and risk measured against thresholds and limits, records checked, and the files placed in the access workflow.
AI-nativeSynthesis as a pipeline stage at each release, relational and panel structure preserved and checked, reports published with the files, and use tracked.

Running example​

The labour force survey of the example organization, in a 300-record extract with six variables, synthesized by the crudest possible method so that the utility and risk reports have something to find: a lost association, a wrong employment rate for men, and fifteen copied records. A pair of forty households and 128 persons with planted structural faults carries the relational check, and a synthesis record for the real release carries the documentation check. All records are invented.

Scope of the examples​

The examples are small on purpose: three hundred records, forty households, one record, so that a reader can run them in an afternoon and see the shape of each measure and what a bad synthesis looks like. They are starting points. Each recipe ends with a What this does not do note that says where the example stops and what the full version adds. The synthesis itself uses the methods and tools named in chapter 2; the scripts here measure, check, and document what they produce.

Files​

FileUsed in
real_sample.csv and synthetic_sample.csvChapters 2 to 4: the extract and its crude synthesis
utility_report.pyChapter 3: marginals, associations, and target analyses
risk_report.pyChapter 4: exact copies, closest-record distance, attribute inference
households_real.csv, persons_real.csv, households_synth.csv, and persons_synth.csvChapter 5: real and synthetic household-person pairs
relational_check.pyChapter 5: integrity, structure, and distribution checks
synthesis_record.md and check_synthesis_record.pyChapter 6: the synthesis record template and its check
ResourcePurpose
This guideHow to produce, measure, document, and use synthetic microdata, in a sequence of practical steps.
REaLTabFormerThe program's generator for tabular and relational synthetic data.
Practical Guide to AI-Ready Microdata DocumentationThe documentation, access tiers, and disclosure control the synthetic file sits beside.
Practical Guide to Monitoring Data UseCounting downloads and finding mentions of the synthetic file.
CodeOpen-source software to deploy or adapt.

Citation​

World Bank. 2026. Practical Guide to Synthetic Data for Sharing: A cookbook for microdata teams and methodologists in national statistical organizations. Version 0.1. AI for Data – Data for AI. https://worldbank.github.io/ai4data/cookbook/synthetic-data-for-sharing/

Version history​

  • 0.1 (October 2026). First draft: seven chapters, recipes, scripts, self-assessment.