Differential privacy in Snowflake Data Clean Room

One of the crucial privacy-enhancing technologies that Snowflake Data Clean Rooms offer is differential privacy. To boost privacy protections for data providers, provide mathematical guarantees around user privacy, and protect against repeated queries trying to obtain individual information, Snowflake Data Clean Rooms implement state-of-the-art techniques in differential privacy, creating incredibly strong, end-to-end protections. Because data clean rooms act as trusted environments, Snowflake Data Clean Rooms implement global differential privacy [^1], with strong privacy guarantees and low noise levels. Snowflake Data Clean Rooms deploy differential privacy in complete alignment with massive-scale deployments.

Differential privacy techniques publish high-level insights about data without revealing any of its individual row-level constituents. One alternative, using simple aggregation to hide row-level information, could expose private information if adversaries can generate “close” queries on the data that differ by one row. The result difference of these queries can compromise personal information (often referred to as a differencing attack).

Differential privacy overcomes this and provides strong mathematical guarantees of data privacy by carefully injecting noise into the return values of any query against private data. Under such noise mechanisms and strategically set privacy budgets, it is statistically impossible to distinguish the results of any such “close” queries.

[^1]: C. Dwork and A. Roth. The Algorithmic Foundations of Differential Privacy. Foundations and Trends in Theoretical Computer Science, 9(3-4):211-407, 2014.

Managing differential privacy

Differential privacy is managed at various levels. Some standard templates provided by Snowflake specify the use of differential privacy. You can also enable differential privacy for custom templates that you create.

Managing differential privacy costs

Differential privacy does incur costs. If you want to manage these costs, you can turn off differential privacy for the account:

  1. First, turn off differential privacy for all clean rooms using the web app:

    1. Log in to the web app as the ACCOUNTADMIN.

    2. For all non-failed clean rooms, even if not shared or published:

      1. Select Clean rooms > Created > Edit.

      2. Select Next until you reach Configure Analysis & Query.

      3. At the bottom of the page, expand Privacy Settings. Deselect Differential Privacy if it is selected, then click Next and Finish to save your changes. If it is not selected, just click Cancel and move on to the next clean room.

  2. Finally, suspend the differential privacy background task in your account by calling provider.suspend_account_dp_task.

Some notes and troubleshooting:

  • If you forget to disable differential privacy for a clean room and suspend the background task, differential privacy may or may not function in that clean room for users who have already installed it. Additional users will not be able to install a clean room with differential privacy installed, while the background task is paused.

  • If anyone attempts to enable differential privacy for a template or clean room in the web app or in code (for example, by calling provider.add_custom_sql_template(differential_privacy_sensitivity=>0), consumer.enable_templates_for_provider_run(enable_differential_privacy_tasks=TRUE), or provider.add_consumers(enable_differential_privacy_tasks=TRUE)) after the background task was disabled, differential privacy will appear to work, but will no longer be secure.

If you later wish to enable differential privacy in your account:

  1. First restart the differential privacy background task in your account by calling provider.resume_account_dp_task.

  2. Then enable differential privacy for specific clean room using the web app by enabling the Privacy Settings > Differential Privacy setting for each clean room, similar to the way you disabled it earlier.