Skip to main content
QUICK REVIEW

[Paper Review] Duet: An Expressive Higher-order Language and Linear Type System for Statically Enforcing Differential Privacy

Joseph P. Near, David Darais|arXiv (Cornell University)|Sep 5, 2019
Privacy-Preserving Technologies in DataComputer Science50 references5 citations
TL;DR

Duet is a higher-order programming language with a novel linear type system that statically enforces differential privacy across general-purpose programs, including complex machine learning workloads. It supports advanced privacy variants like $(\epsilon,\delta)$, Rényi, and zero-concentrated differential privacy, enabling automated verification of privacy bounds with improved accuracy in trained models.

ABSTRACT

During the past decade, differential privacy has become the gold standard for protecting the privacy of individuals. However, verifying that a particular program provides differential privacy often remains a manual task to be completed by an expert in the field. Language-based techniques have been proposed for fully automating proofs of differential privacy via type system design, however these results have lagged behind advances in differentially-private algorithms, leaving a noticeable gap in programs which can be automatically verified while also providing state-of-the-art bounds on privacy. We propose Duet, an expressive higher-order language, linear type system and tool for automatically verifying differential privacy of general-purpose higher-order programs. In addition to general purpose programming, Duet supports encoding machine learning algorithms such as stochastic gradient descent, as well as common auxiliary data analysis tasks such as clipping, normalization and hyperparameter tuning - each of which are particularly challenging to encode in a statically verified differential privacy framework. We present a core design of the Duet language and linear type system, and complete key proofs about privacy for well-typed programs. We then show how to extend Duet to support realistic machine learning applications and recent variants of differential privacy which result in improved accuracy for many practical differentially private algorithms. Finally, we implement several differentially private machine learning algorithms in Duet which have never before been automatically verified by a language-based tool, and we present experimental results which demonstrate the benefits of Duet's language design in terms of accuracy of trained machine learning models.

Motivation & Objective

  • To close the gap between advanced differentially-private algorithms and automated verification tools by enabling static, language-based proofs of privacy.
  • To support expressive, general-purpose programming with higher-order functions, compound datatypes, and matrix operations in a privacy-preserving context.
  • To enable static verification of modern privacy variants, including $(\epsilon,\delta)$, Rényi, and zero-concentrated differential privacy, which previous systems could not handle.
  • To improve the accuracy of differentially private machine learning models by enabling precise, automatically computed privacy bounds.
  • To provide a practical, extensible framework that supports real-world ML pipelines such as stochastic gradient descent, clipping, and hyperparameter tuning.

Proposed method

  • Duet uses a dual-language design: a sensitivity language with metric-scaling linear types to bound function sensitivity, and a privacy language with linear types without scaling to compose private computations.
  • The privacy language employs linear typing to track resource usage per variable and compose independent privacy costs across multiple function arguments.
  • The system supports multiple privacy variants—$(\epsilon,\delta)$, Rényi, zCDP, tCDP—by encoding them within the linear type system, enabling precise and composable privacy accounting.
  • It integrates type-safe abstractions for common data analysis operations such as clipping, normalization, and matrix computations, essential for ML pipelines.
  • The type system ensures that well-typed programs are differentially private by construction, with privacy bounds computed automatically via type inference.
  • The design allows for modular extension to new privacy variants, with formal proofs of privacy correctness for well-typed programs.

Experimental results

Research questions

  • RQ1Can a general-purpose higher-order language with a linear type system statically verify differential privacy for complex, real-world machine learning pipelines?
  • RQ2Can the type system support advanced privacy variants like $(\epsilon,\delta)$ and Rényi differential privacy while maintaining precision and composability?
  • RQ3Can the language express and verify privacy-preserving operations such as clipping, normalization, and hyperparameter tuning in a type-safe way?
  • RQ4Does the static verification in Duet lead to improved model accuracy compared to prior tools that require manual proofs?
  • RQ5Can the system be extended to support new privacy variants without breaking existing guarantees?

Key findings

  • Duet successfully verifies several differentially private machine learning algorithms—previously unverified by language-based tools—demonstrating its practical applicability.
  • The system computes precise, end-to-end privacy bounds for complex pipelines involving stochastic gradient descent, clipping, and hyperparameter tuning.
  • Experiments show that Duet’s language design leads to improved model accuracy by enabling tighter, more accurate privacy budget accounting.
  • The dual-language architecture with separate sensitivity and privacy type systems enables precise composition of privacy costs across higher-order functions and data transformations.
  • Duet supports modern privacy variants including Rényi and zero-concentrated differential privacy, which previous type systems could not express due to limitations in effect modeling.
  • Formal proofs establish that well-typed programs in Duet are differentially private, with privacy guarantees derived from the type system.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.