Autoregressive Synthesis of Sparse and Semi-Structured Mixed-Type Data

The paper introduces Origami, an autoregressive transformer-based architecture that natively generates high-fidelity, privacy-preserving synthetic data from sparse, semi-structured mixed-type formats like JSON without requiring flattening or imputation, outperforming existing methods designed for dense tabular data.

Thomas Rückstieß, Robin Vujanic

Published 2026-03-03
📖 5 min read🧠 Deep dive

Imagine you are a librarian trying to recreate a massive, chaotic library for a new building.

The Problem: The "Flattening" Disaster
Most modern libraries (databases) don't store books in neat, uniform rows like a spreadsheet. Instead, they store them like JSON files: a messy, nested pile of folders, sub-folders, and lists.

  • One book might have a "Author" folder, inside which is an "Address" folder, inside which is a "Street" and "City."
  • Another book might have a "Reviews" list with 50 items, while a third has none.
  • Some books have a "Price" tag, others don't.

Existing AI tools for making fake data (synthetic data) were built for flat spreadsheets. To use them on this messy library, you have to force everything into a giant, flat table.

  • The Analogy: Imagine trying to fit a 3D tree into a 2D piece of paper. You have to stretch every branch out.
  • The Result: You end up with a table that has thousands of columns (one for every possible sub-folder). Most of these columns are empty (sparse) because not every book has every sub-folder. It's like trying to fill a stadium with seats, but 90% of the seats are empty. The AI gets confused, the computer runs out of memory, and the fake data looks nothing like the real thing.

The Solution: Origami
The authors built a new AI called Origami. Instead of forcing the messy data into a flat sheet, Origami learns to fold it like paper. It treats the data exactly as it is: a hierarchy of keys, values, and structures.

Here is how Origami works, using simple metaphors:

1. The Tokenizer: Turning Data into Lego Bricks

Instead of reading the whole book at once, Origami breaks every record down into tiny, specific Lego bricks called tokens.

  • It sees a "Key" (like "Author").
  • It sees a "Value" (like "Jane Doe").
  • It sees "Structural Bricks" (like "Start of a Folder," "End of a List").
  • Why it matters: It doesn't care if the list is long or short. It just builds the structure brick by brick.

2. The Map: KVPE (The GPS for Data)

Standard AI models usually count steps: "This is the 1st word, this is the 2nd word." But in a JSON file, the order of keys doesn't matter. "Author" then "Title" is the same as "Title" then "Author."

  • The Analogy: If you tell a robot to walk "10 steps forward," it might walk into a wall if the room is different.
  • Origami's Trick: It uses Key-Value Position Encoding (KVPE). Instead of counting steps, it gives every brick a GPS coordinate based on its location in the folder tree. It knows exactly where a piece belongs, regardless of the order. This prevents the AI from memorizing a specific order and forces it to learn the actual relationships between the data.

3. The Shuffling: The "Randomized Puzzle"

To make sure the AI doesn't just memorize the data (cheating), the authors do something clever: they shuffle the order of the keys every time they show the AI a record.

  • The Analogy: Imagine teaching someone to bake a cake by showing them the ingredients in a different order every time (Eggs, Flour, Sugar... then Sugar, Flour, Eggs...).
  • The Result: The student can't just memorize the sequence; they have to understand the logic of baking. This makes the AI much smarter and less likely to copy-paste real data (which is a privacy risk).

4. The Dual-Head Chef: Handling Numbers and Words

Real data has both words (categorical) and numbers (continuous).

  • The Problem: Standard AI often tries to turn numbers into words (discretizing them), which loses precision. Or it tries to turn words into numbers, which gets messy.
  • Origami's Chef: It has two heads working together.
    • Head 1 (The Word Chef): Predicts keys, categories, and structure (like "Action Movie" or "Start of Array").
    • Head 2 (The Math Chef): Predicts numbers using a special "Mixture of Gaussians" (a fancy way of saying it understands that numbers can be clustered in different ways, like a bell curve).
  • The Result: It handles both types perfectly without forcing them into the wrong shape.

5. The Grammar Police: Pushdown Automaton

When Origami generates new data, it needs to make sure it doesn't create nonsense (like a list that never ends or a folder that opens but never closes).

  • The Analogy: Imagine a strict editor who checks every sentence you write to ensure you have a matching closing parenthesis.
  • The Result: Every piece of fake data Origami creates is perfectly valid JSON. It never breaks the rules.

The Big Win

The paper tested Origami against the best existing tools (like GANs, Diffusion models, and other Transformers) on datasets ranging from simple tables to massive, messy medical records with over a million entries.

  • On simple data: Origami was just as good as the best tools.
  • On messy, sparse data: The other tools crashed, ran out of memory, or produced garbage. Origami thrived. It created data that was so realistic, even a super-smart computer couldn't tell the difference between the real and fake data.

In Summary:
If existing data tools are like a flat iron trying to press a crumpled, 3D origami bird into a flat sheet (ruining it), Origami is a new tool that understands how to fold the paper in 3D, preserving the bird's shape, wings, and tail perfectly, even if the bird is huge and complex.

Get papers like this in your inbox

Personalized daily or weekly digests matching your interests. Gists or technical summaries, in your language.

Try Digest →