Skip to main content
CARLA HQ
#SyntheticData#DifferentialPrivacy#Google Sheets#Carla

Generating Privacy-Preserving Synthetic Tabular Data in Google Sheets

Aug 8, 20265 min read
Daniel Münch(Carla HQ Founder)

Tabular data in spreadsheets contains the operational core of most companies. Customer attrition logs, biomedical clinical metrics, financial forecasts, and salary records sit inside spreadsheets. But sharing that data with external partners, data science teams, or machine learning pipelines creates compliance risks.

Standard masking tricks fail on high-dimensional tables. Cross-referencing auxiliary datasets makes re-identification straightforward.

The alternative is synthetic data generation. Instead of obfuscating real records, you build a generative model that learns the joint distribution of your data. The model then samples synthetic rows that mirror the statistical correlations of the original table without containing a single real record.

In this post, we explain what synthetic data is, how Carla uses stochastic Langevin diffusion to sample artificial rows, and how differential privacy guarantees privacy for sensitive business tables.

Why do teams need synthetic tabular data?

Real data is difficult to move. Legal teams block external transfers. Compliance frameworks like GDPR and HIPAA penalize accidental leaks. Production data cannot be shared with external contractors or third-party tool vendors.

Synthetic data solves three specific operational bottlenecks:

  • Safe data sharing for business workflows. Small and medium enterprises can share realistic telemetry, churn logs, or financial tables with external advisors and tools without exposing proprietary raw records.
  • Stress-testing and benchmarking. Machine learning models require edge cases and balanced target distributions. Synthetic generators can oversample underrepresented classes to balance training sets.
  • Local offline prototyping. Developers can build and test analytical pipelines using realistic synthetic tables without requesting production database dumps.

How does synthetic data generation work in Carla?

Traditional generative models for images rely on heavy deep learning architectures like GANs or diffusion networks. Tabular data requires a different approach because tables contain a mix of continuous numbers, integer counts, and discrete categorical labels.

In Carla, we use energy-based models paired with Langevin diffusion.

An energy function assigns low energy values to plausible data points that resemble real rows, and high energy values to implausible points. Sampling synthetic data becomes an optimization problem. You place initial points into the feature space and walk them toward regions of low energy.

How does Langevin diffusion sample artificial rows?

To sample synthetic rows locally inside Google Sheets without sending data to an external server, Carla uses Stochastic Gradient Langevin Dynamics (Welling & Teh, 2011).

The generation process follows three steps:

  1. Energy gradient computation. The algorithm computes gradients across continuous features and encoded categories. The gradient points in the direction that makes synthetic samples match the underlying statistical distribution.
  2. Preconditioned optimization. Standard Langevin diffusion can oscillate in steep energy valleys. We track historical squared gradients using a preconditioner. This accelerates convergence, allowing synthetic samples to reach equilibrium quickly.
  3. Calibrated noise injection. During each step, Gaussian noise is injected into the samples.

Adding controlled noise allows synthetic samples to explore the feature space and escape local minima. The output is a synthetic table that preserves feature correlations, target labels, and marginal distributions.

What is privacy-preserving AI?

Generating synthetic data from energy functions creates realistic rows. But if a model overfits, synthetic points might land too close to actual training rows. An adversary could infer whether a specific company record was included in the dataset.

This is where privacy-preserving AI comes in.

Privacy-preserving synthetic data generation guarantees that individual company records, customer identities, and confidential metrics cannot be reconstructed or reverse-engineered by third parties.

To enforce this, Carla applies Differential Privacy (Dwork et al., 2006) to the Langevin sampler (Abadi et al., 2016).

How does differential privacy guarantee safety?

Differential privacy provides a mathematical bound on privacy risk. It guarantees that the output of an algorithm remains virtually identical whether any single individual record is included in or excluded from the input dataset.

The differentially private sampler enforces two strict constraints during generation:

  • Per-sample gradient clipping. Individual gradient vectors are clipped to a maximum norm. This bounds sensitivity, ensuring no single outlier row exerts excessive influence on the generated samples.
  • Calibrated Gaussian noise injection. Noise proportional to the privacy budget is added to every parameter update.

The privacy budget is parameterized by the noise multiplier (σ). The noise multiplier controls the trade-off between privacy protection and data utility:

  • Standard generation (σ = 0.1). Maximum statistical fidelity. Ideal for non-sensitive public benchmarks.
  • Low privacy (σ = 0.3, ε ≈ 10). Minimal noise injection with basic sensitivity bounds.
  • Balanced differential privacy (σ = 0.4, ε ≈ 3). The standard setting in Carla for sensitive business telemetry. It maintains statistical utility while preventing individual record reconstruction.
  • High privacy (σ >= 1.0, ε <= 1). Strict privacy guarantee for highly confidential financial or medical tables.

Running private synthetic generation in spreadsheets

Synthetic generation runs locally inside Carla’s Chrome Extension sidepanel.

When you train a model on a sheet, you open the predictor workspace, select the number of rows to create, and toggle Differential Privacy.

Carla executes Langevin sampling entirely in local memory. Once sampling completes, Carla creates a new tab in your Google Sheet (Synthetic Data) and populates the generated rows along with clean column header names.

Your raw data never leaves your local workspace. The synthetic data created is private by default.

Join the private beta

Carla is currently in private beta. If you want to generate privacy-preserving synthetic tables directly inside Google Sheets, join our waitlist for early access.

Join the Carla private beta to get early access, or explore our documentation to see how Carla keeps your tabular data private.

Daniel Münch

Daniel Münch

Carla HQ Founder

Seasoned software engineer and applied mathematician with 15+ years of experience transforming complex challenges into scalable solutions across biomedical imaging, HrTech, PropTech, and FinTech domains.

← Back to all articles