Statistical synthesis

Synthetic data that keeps the patterns, not the people

See, step by step and live in your browser, how Gigantics learns the distributions and correlations of your tables, generates new rows from them, and measures fidelity and privacy in a report.

Why it matters

Fake data made field by field loses what analysts look for

Below are the employees of a made-up company. Fake them field by field and every column looks plausible, but pay no longer grows with the years and some people leave before they were hired. Learn a statistical model and the patterns come back. Everything on this page runs live in your browser.

Synthetic data made

Real data: salary by years worked

100k200k051015Years worked

Synthetic data: salary by years worked

Statistical model

100k200k051015Years worked

Fidelity to the real data

96.6%

Another real sample scores 97.2%

Salary and years worked, rank correlation

0.79

Real data: 0.81

People who leave before they were hired

0

Pass

Real data: none

Step 1

Learn the shape of each column

Numbers and dates go into bins with the same number of people. Inside each bin the model keeps a few knots, each the average of at least minCell values, never the value of a real person. Categories seen fewer than minCell times are folded into Other, so a rare value can't single anyone out.

Salary, real and synthetic, by bin

8 bins of about 1,009 people each

  • Real data
  • Statistical model
0%5%10%29k38k44k53k61k69k86k105k

Knots of the first bin: 29,190 · 29,870 · 30,410 · 30,650 · 30,980 · 31,230 …101 knots in this bin, each the average of 10 salaries

Department: kept, or folded into Other

Departments with fewer than 10 people are folded into Other

  • Real data
  • Statistical model
0%10%20%30%EngineeringSalesOperationsFinancePeopleLegalResearch
Step 2

Learn which columns move together

A Bayesian network links each column to the columns that tell the most about it, measured by mutual information and penalised by the size of the table it needs. Each link is a table of counts, and the model samples column by column, parents first. With more rows the model can afford more links.

Parents per column
Rows learned

The network learned: select a column

Arrows show what the model uses to sample, not causes.

Salary: 0.78 bits of mutual information with its parents

DepartmentLevelSalaryYears workedHas leftYears since leaving

Salary by Years worked

A combination seen fewer than 10 times backs off to fewer parents

Salary29k38k44k53k61k69k86k105k0.1–1.141%31%15%9%4%0%0%0%1.1–1.829%27%20%13%10%2%1%0%1.8–2.518%19%21%18%18%3%2%0%2.5–3.28%14%19%19%23%10%5%0%3.2–4.23%7%16%20%22%18%13%0%4.2–5.31%2%8%16%15%28%27%3%5.3–7.30%0%1%5%8%30%37%18%7.3–19.90%0%0%0%0%7%14%78%
Step 3

Keep the detail inside the bins

Bins carry most of the shape: with more bins, the synthetic cloud of salary and bonus follows the real one more closely. A Gaussian copula of the ranks inside the bins puts back part of the order that coarse bins lose.

Copula of the ranks inside the bins

Real data: bonus by salary

05k10k15k50k100k150kSalary

Synthetic data: bonus by salary

05k10k15k50k100k150kSalary

Rank correlation, synthetic

0.71

Real data: 0.86

Copula correlation inside the bins

0.28

Learned from the ranks of the real rows in their bins

Step 4

Dates that make sense

A date is learned as the time after its anchor: the date of leaving is the date of hire plus the years worked. A synthetic person can't leave before being hired, and the time people stay follows the real one. Learn each date on its own and the order breaks.

Learn the dates

Twelve synthetic people: hired and left

  • Still employed
  • Left
  • Left before being hired
16 years ago12 years ago8 years ago4 years agotoday#7#10#15#20#22#27#28#30#35#1#2#3

Synthetic people who leave before they were hired

0

Pass

Out of 8,072 synthetic people

Step 5

Generate any volume, the same every time

Each synthetic row is a function of the seed and its position. The same seed gives the same table, a new seed a new table with the same patterns, and a big table can be made in parts side by side that add up to exactly the whole. In the product this runs at 150,000 to 320,000 rows per second per core.

#PartDepartmentLevelSalaryYears workedHas left
11SalesL3102,6005.6no
21OperationsL139,9001.5no
31SalesL389,7007.9no
41EngineeringL261,7000.6yes
51SalesL391,9003.5no
61SalesL392,9006.5no
71EngineeringL139,5001.9no
81SalesL388,7005.6no

400 rows made in 4 parts of 100: identical to the table made at once

Step 6

The report: fidelity and privacy, measured

Before a model is used, its report compares the synthetic data with real rows the model never saw. Fidelity is scored against another real sample, so you know what good looks like for your data. The privacy checks look for synthetic rows that are too close to real people.

Distance to the real data, by column

Lower is closer. KS for numbers, total variation for categories.

  • Statistical model
  • Another real sample
0.000.050.10DepartmentLevelHas leftSalaryYears workedHired, years ago

Fidelity

96.6%

Another real sample scores 97.2%

The closest real record

For each synthetic row we find the closest real row among those the model learned from, and among real rows it never saw. If the model learned patterns and not people, about half the synthetic rows are closer to each. The expected share and its spread come from relabelling the two sets at random, so review and fail are measured, not guessed. Move the slider to see what a model that memorises looks like.

Share of synthetic rows closer to the training rows

expected 0.50reviewfail0.51

The checks measure the risk, they don't prove its absence. Differential privacy gives the guarantee.

Share of synthetic rows closer to the training rows

0.51

Pass

Synthetic rows identical to a real one

0

Of 300 synthetic rows checked

Optional

Differential privacy, with its price on display

With differential privacy, the model adds calibrated noise to every count it keeps, so no single person can change what it learns by more than the budget ε allows. A smaller ε protects more and keeps less: the tables below show the noise, and the report shows what it costs.

Privacy budget

Salary by Level, without noise

1,600 rows learned

Salary30k38k43k53k60k70k87k109kL140%40%21%0%0%0%0%0%L20%1%19%38%36%8%0%0%L30%0%0%0%3%44%50%3%L40%0%0%0%0%0%10%90%L50%0%0%0%0%0%0%100%

Salary by Level, as the model keeps it

Off · 1,600 rows learned

Salary30k38k43k53k60k70k87k109kL140%40%21%0%0%0%0%0%L20%1%19%38%36%8%0%0%L30%0%0%0%3%44%50%3%L40%0%0%0%0%0%10%90%L50%0%0%0%0%0%0%100%

Measured on our nine-table HR example

Privacy budgetFidelityBusiness checks kept
Off98.0%5 / 5
ε = 1094.9%5 / 5
ε = 390.5%2 / 5
ε = 183.8%1 / 5

In the product, the budget also covers the structure, the bins and the copula, each person counts with all their related rows up to a limit, and the bounds of numbers must be public. This demo adds the noise to the tables only.

Fidelity of this model

94.6%

What leaves your database

A model of counts, not a copy of people

The model is a small file, 48 KB for the nine tables of our HR example, kept encrypted with AES-256-GCM in Gigantics. Its report can be signed as audit evidence.

The model keeps

  • Counts per bin and per combination of parents, each of at least minCell people
  • Knots inside the bins: averages of minCell values
  • The correlations of the ranks inside the bins
  • How many child rows each parent has, and the roles of the columns

The model never keeps

  • Rows, keys or exact values
  • Names, emails and other identifiers: they are faked by their labels
  • Categories rarer than minCell
  • Anything readable outside Gigantics

Across related tables

Children are learned per parent: how many applications a candidate has is a column of the candidate, and each application carries context from its candidate, such as the source. References to other tables are weighted as in the real data, so keys always point to rows that exist.

Frequently asked questions

Questions about statistical synthesis

Is synthetic data anonymous?

It contains no real rows, and its report measures how close it comes to real people. With differential privacy, the model also has a mathematical bound on what any one person can change. Whether that is enough for a given use is a decision for your privacy team, and the signed report is the evidence they review.

How does it compare with deep learning generators?

For tables of business data, a Bayesian network with a copula keeps the distributions and the strongest relationships with a small model you can inspect, learns in seconds without GPUs, and runs inside Gigantics, so data doesn't leave your network. The report shows its fidelity against another real sample, table by table.

Does it work across related tables?

Yes. Children are learned per parent, with how many each parent has and context from the parent, and references between tables are kept.

Can I combine it with the anonymization rules?

Yes. In a Synthesize operation each entity uses the rules engine or a statistical model, and names, emails and other identifiers still come from fake data by label, consistent with the sex and country of their row.

Is this page running the product?

It runs a reduced version of the algorithm in your browser, on made-up data. The product learns from samples of your databases, across tables, and writes the report you can sign.

Next step

Try it on your own tables with a specialist

We learn a model from a sample of your data, generate the synthetic tables and go through the report with you.