DP-Auditorium: 差分プライバシー監査のための柔軟なライブラリ
Google Researchは、差分プライバシー(DP)アルゴリズムの実装と数学的証明の正確性を体系的に検証するための柔軟なオープンソースライブラリ「DP-Auditorium」を発表した。
キーポイント
差分プライバシー実装の検証課題
差分プライバシー(DP)アルゴリズムは、数学的証明の誤りや実装時の人的ミスにより、主張されるプライバシー保証を満たさないケースが実際に発見されており、信頼性の検証が重要な課題となっている。
DP-Auditoriumの目的と特徴
DP-Auditoriumは、DPメカニズムの実用的かつ効率的な監査(オーディット)を可能にする、拡張性の高いライブラリとして開発された。
監査の複雑さと技術的挑戦
DPの監査は、メカニズムのランダム性や保証の確率的性質、純粋DP、近似DP、レニーDPなど多様な保証タイプの存在により、本質的に困難な課題である。
業界全体への波及効果
このライブラリは、連邦学習や国勢調査など、差分プライバシーを採用する幅広い産業や政府アプリケーションにおける実装の信頼性向上に貢献することが期待される。
DP-Auditoriumの特徴
DP-Auditoriumは、メカニズムの内部特性を知らなくても(ブラックボックスアクセスのみで)差分プライバシー保証を監査できるオープンソースライブラリです。Pythonで実装され、柔軟なインターフェースを提供し、テスト能力を継続的に改善するための貢献を可能にします。
新しいテストアルゴリズム
DP-Auditoriumは、Rényi DP、pure DP、approximate DPに対して関数空間上で発散最適化を実行する新しいテストアルゴリズムを導入しています。
DP保証の数学的基礎
差分プライバシー保証は、1レコードのみが異なる隣接データセットDとD'に対する確率分布M(D)とM(D')の間の特定の発散指標における識別不可能性に関連しています。
影響分析・編集コメントを表示
影響分析
この発表は、プライバシー保護技術の実用段階において、その信頼性を担保する基盤ツールを提供するものであり、技術の社会実装を加速させる重要な一歩と言える。特に、政府統計や医療データ分析など高い信頼性が要求される分野でのDP採用を後押しし、業界全体の標準化と品質向上に寄与する可能性が高い。
編集コメント
プライバシー保護技術が成熟期を迎え、実装の「品質保証」という次の課題に取り組む段階に入ったことを示す象徴的な発表。研究段階から実装・運用段階への橋渡しをする重要なインフラツールと言える。
Google Research の研究科学者、モニカ・リベロ・ディアス氏による投稿

DP-Auditorium は、差分プライバシー(differential privacy)の監査を柔軟かつ効率的に行うためのライブラリです。このツールは、機械学習モデルやデータ分析パイプラインにおいて、適用されたプライバシー保護が理論的な保証を満たしているかを検証するために設計されています。
従来の監査手法は、特定のアルゴリズムや設定に依存しており、新しいプライバシー機構への対応が遅れる傾向がありました。DP-Auditorium は、これらの制約を克服し、多様なプライバシー保護手法を統一的なフレームワークで評価できることを可能にします。
このライブラリの特徴として、以下の点が挙げられます:
- 柔軟なアーキテクチャにより、カスタムアルゴリズムのサポートが可能
- 統計的検定に基づく厳密な監査機能
- 大規模データセットや複雑なモデル構造への対応能力
- 開発者向けに直感的な API を提供
実装例では、差分プライバシーを適用した機械学習モデルの監査プロセスが示されています。具体的には、ノイズ追加のパラメータ設定や、プライバシーバジェット(privacy budget)の追跡方法などが詳細に解説されています。
DP-Auditorium の利用により、研究者や開発者は、プライバシー保護の実装が理論的保証を満たしているかを迅速かつ正確に検証できます。これにより、データプライバシーを重視するアプリケーションの開発における信頼性が向上します。
本ライブラリはオープンソースとして公開されており、コミュニティによる継続的な改善と拡張が期待されています。技術的な詳細や使用例については、公式ドキュメントをご参照ください。
差分プライバシー (DP) は、データを処理・分析する際に、任意の個人ユーザーの情報による影響を制限する確率化メカニズムが持つ性質である。DP は、データ保護への高まる懸念に対処するための堅牢な解決策を提供し、個々のユーザーの身元を損なうことなく、技術や政府アプリケーション(例:米国国勢調査) across 業界 にわたる展開を可能にする。その採用が増えるにつれ、実装に欠陥のあるメカニズムを開発する際の潜在的なリスクを特定することが重要である。研究者らは最近、プライバシーを持つメカニズムの数学的証明およびその実装における誤りを見つけた。例えば、研究者は 6 つのスプースベクトル技術 (Sparse Vector Technique: SVT) のバリエーションを比較したが、そのうち実際に主張されたプライバシー保証を満たしたのは2つだけだった。数学的証明が正しくても、メカニズムを実装するコードは人間のミスに対して脆弱である。
しかし、実用的かつ効率的な差分プライバシー(DP)監査は、メカニズムに内在するランダム性と、検証される保証の確率論的な性質が主な原因で困難です。さらに、純粋 DP pure DP、近似 DP approximate DP、Rényi DP Rényi DP、集中 DP concentrated DP など、さまざまな保証タイプが存在し、この多様性が監査問題の定式化における複雑さに寄与しています。さらに、提案されたメカニズムの膨大な量ゆえに、数学的証明やコードベースのデバッグは困難な課題です。特定のメカニズムの仮定の下では *ad hoc* なテスト手法も存在しますが、DP メカニズムをテストするための拡張可能なツールを開発しようとする取り組みはほとんど行われていません。
そのために、「DP-Auditorium: A Large Scale Library for Auditing Differential Privacy」において、メカニズムの内部特性を一切知らずにブラックボックスアクセスのみで DP(差分プライバシー)保証を検証するためのオープンソースライブラリを紹介しました。DP-Auditorium は Python で実装されており、継続的にテスト機能を改善するための貢献を受け付ける柔軟なインターフェースを提供しています。また、Rényi DP、純粋 DP、近似 DP に対して関数空間上で発散最適化を行う新しいテストアルゴリズムも導入しました。DP-Auditorium が DP 保証の違反を効率的に特定できること、およびさまざまなプライバシー保証の下で特定のバグを検出するためにどのテストが最も適しているかを提案できることを示します。
**
DP 保証
DP メカニズムの出力は、ユーザーデータのプライバシーを保証する数学的性質を満たす確率分布(M(D))から抽出された標本です。したがって、DP 保証は、対となる確率分布間の性質と密接に関連しています。メカニズムが差分プライベートであるとは、データセット D とレコードが 1 つだけ異なる隣接データセット D' に対して M が決定する確率分布が、与えられた発散計量の下で 識別不可能 であることを意味します。
例えば、古典的な 近似 DP の定義では、メカニズム M(D) と M(D') の間の順序 eε における ホッケースティック発散 が δ を超えない場合、そのメカニズムはパラメータ (ε, δ) で近似 DP であるとされます。純粋な DP は δ = 0 という近似 DP の特殊ケースです。最後に、順序 α における Rényi 発散 が ε(ただし ε は小さな正の値)以下である場合、そのメカニズムはパラメータ (α, ε) で Rényi DP とみなされます。これら 3 つの定義において、ε は互換性のあるものではありませんが、直感的には同じ概念を伝えています;ε の値が大きいほど、2 つの分布間の発散が大きくなるか、プライバシー保護が弱まることを意味します。これは、2 つの分布が区別しやすくなるためです。
DP-Auditorium
DP-Auditorium は、プロパティテスターとデータセットファインダーという 2 つの主要なコンポーネントから構成されています。プロパティテスターは、特定のデータセット上で評価されたメカニズムからのサンプルを入力として受け取り、提供されたデータセットにおけるプライバシー保証の違反を特定することを目指します。一方、データセットファインダーは、プライバシー保証が失敗する可能性のあるデータセットを提案します。両方のコンポーネントを組み合わせることで、DP-Auditorium は (1) 多様なメカニズムおよびプライバシー定義の自動テストと、(2) プライバシー保護メカニズムにおけるバグの検出を実現します。我々は、レコードの平均値を計算する単純なメカニズムから、異なる SVT や 勾配降下法 メカニズムの変種などより複雑なメカニズムに至るまで、さまざまなプライベートおよび非プライベートなメカニズムを実装しています。
プロパティテスターは、与えられた2つの確率分布 P と Q の間の発散が、テスト対象の差分プライバシー保証によって決定される事前に指定された予算内に収まっているという仮説を棄却する証拠が存在するか否かを判定します。これらは P および Q から得られるサンプルから下限値を計算し、その下限値が期待される発散を超えた場合にプロパティを棄却します。結果が実際に予算内に収まっている場合でも、保証は提供されません。一連のプライバシー保証を検証するために、DP-Auditorium は3 つの新しいテスターを導入しています:(1) HockeyStickPropertyTester、(2) RényiPropertyTester、および (3) MMDPropertyTester です。他のアプローチとは異なり、これらのテスターはテスト対象の分布に対する明示的なヒストグラム近似に依存しません。それらは、関数空間における最適化を通じて発散を推定可能にする、ホッケースティック発散、Rényi 発散、および 最大平均不整合 (MMD) の変分表現に依存しています。ベースラインとして、我々は一般的に使用される近似差分プライバシーテスターである HistogramPropertyTester を実装しました。我々の3 つのテスターは類似のアプローチに従っていますが、簡潔さのため、本稿では HockeyStickPropertyTester に焦点を当てます。
隣接する2つのデータセット D と D' に対して、HockeyStickPropertyTester は、M(D) と M(D') の間のホッケースティック発散に対する下限 δ̂ を、高い確率で保証します。ホッケースティック発散は、近似差分プライバシー(Approximate Differential Privacy)の保証の下で、2 つの分布 M(D) と M(D') が互いに近いことを強制する性質を持ちます。したがって、あるプライバシー保証がホッケースティック発散を δ 以下であると主張しているにもかかわらず、計算された下限 δ̂ が δ より大きい場合、高い確率で実際の発散は保証された値を超えており、そのメカニズムは与えられた近似差分プライバシーの保証を満たすことができません。この下限 δ̂ は、ホッケースティック発散の変分定式化(variational formulation)の実用的かつ計算可能な対応物として算出されます(詳細については 論文 を参照してください)。δ̂ の精度は、メカニズムからサンプリングするサンプル数が増えるほど向上しますが、変分定式化を単純化するほど低下します。我々はこれらの要因をバランスさせることで、δ̂ が正確かつ計算容易であることを確保しています。
データセット発見者は、ブラックボックス最適化を用いて、発散値δの下限である*^δ*を最大化するデータセット*D*および*D'*を探します。ここで注意すべきは、ブラックボックス最適化手法は、目的関数の勾配を導出することが実用的でない場合や不可能な場合に特に設計されているという点です。これらの最適化手法は、探索フェーズと活用フェーズの間で振動しながら目的関数の形状を推定し、目的関数が最適な値をとる可能性のある領域を予測します。これに対し、グリッドサーチ法のような完全探索アルゴリズムは、隣接するデータセット*D*および*D'*の全空間を検索します。DP-Auditoriumは、オープンソース化されたブラックボックス最適化ライブラリVizierを通じて、異なるデータセット発見者を実装しています。
既存のコンポーネントを新しいメカニズムで実行するには、データ*D*の配列と、その*D*上で計算されるメカニズムによって出力されるべきサンプル数*n*を受け取るPython関数としてメカニズムを定義するだけで十分です。さらに、ユーザーが独自のテストやデータセット探索アルゴリズムを実装できるように、テスターおよびデータセット発見者用の柔軟なラッパーも提供しています。
**
主要な結果
DP-Auditorium の有効性を、多様な出力空間を持つ 5 つのプライベートメカニズムと 9 つの非プライベートメカニズムに対して評価しました。各プロパティテスターについては、固定されたデータセット上で異なる *ε* 値を用いてテストを 10 回繰り返し、各テスターがプライバシーバグを検出した回数を報告します。どのテスターも一貫して他よりも優れているわけではありませんが、従来の手法では見逃されてしまうバグ(HistogramPropertyTester)を特定できました。なお、HistogramPropertyTester は SVT メカニズムには適用できません。
テスト対象の非プライベートメカニズムにおいて、各プロパティテスターがプライバシー違反を検出した回数です。NonDPLaplaceMean および NonDPGaussianMean メカニズムは、平均値を計算するための Laplace および Gaussian メカニズムの誤実装です。
また、TensorFlow における DP グラデント降下アルゴリズム(DP-GD)の実装についても分析を行います。これはプライバシーデータ上の損失関数の勾配を計算するものです。プライバシーを維持するために、DP-GD は勾配の l2 ノルム を値 G で制限するためのクリッピング機構を採用し、その後ガウスノイズを追加します。この実装は、追加されるノイズのスケールが G であると誤って仮定していますが、実際にはそのスケールは sG(s は正のスカラー)です。この不一致により、DP の保証が成立するのは s が 1 以上の場合のみという近似結果になってしまいます。
私たちは、プロパティテスターがこのバグを検出する有効性を評価し、HockeyStickPropertyTester とRényiPropertyTester がプライバシー違反を特定する上で MMDPropertyTester や HistogramPropertyTester を上回る優れた性能を示すことを示します。特筆すべきは、これらのテスターが *s* の値が 0.6 という高い値であってもバグを検出することです。*s* = 0.5 は、プライバシー予算 *ε* を考慮する際に 2 倍の係数を欠くという文献における一般的な誤りに対応することに留意しておく価値があります。DP-Auditorium は、以下に示すようにこのバグを正しく捉えています。詳細については、こちらのセクション 5.6 を参照してください。
HistogramPropertyTester(左)と HockeyStickPropertyTester(右**)を使用して DP-GD をテストする際の、異なる *s* の値に対する推定発散値および検定閾値。
**
RényiPropertyTester(左)と MMDPropertyTester(右**)を使用して DP-GD をテストする際の、異なる *s* の値に対する推定発散値および検定閾値
データセット発見ツールのテストを行う際、プライバシー違反が見つかるまでに探索されたデータセットの数を計算します。平均すると、バグの大半はデータセット発見ツールへの呼び出しが 10 回未満で発見されます。ランダム化手法や探索・活用(exploration/exploitation)手法は、グリッドサーチよりも効率的にデータセットを発見できます。詳細については 論文 をご覧ください。
結論
差分プライバシー(DP: Differential Privacy)は、データ保護のための最も強力な枠組みの一つです。しかし、DP メカニズムの適切な実装は難しく、従来の単体テスト手法では容易に検出できないエラーが発生しやすいという課題があります。統一されたテストフレームワークは、監査人、規制当局、研究者が、プライバシーメカニズムが実際に機密性を保っていることを確認する手助けとなります。
DP-Auditorium は、関数空間における発散最適化を通じて DP をテストするための新しいアプローチです。私たちの結果は、この種のパラメータに基づく推定手法が、従来のブラックボックスアクセス型テスターを一貫して上回ることを示しています。最後に、ヒストグラム推定と比較して、これらのパラメータに基づく推定量がプライバシーバグの発見率を向上させることも実証しました。DP-Auditorium を オープンソース化 することで、新しい差分プライバシーアルゴリズムのエンドツーエンドテストにおける標準を確立することを目指しています。
謝辞
ここで紹介する研究は、アンドレス・ムニョス・メディナ、ウィリアム・コング、ウマル・サイードとの共同作業です。当ライブラリに対する有益なエンジニアリング支援やインターフェースに関する提案をいただいたクリス・ディバックとバディム・ドロシェンコに感謝いたします。
*The work described here was done jointly with Andrés Muñoz Medina, William Kong and Umar Syed. We thank Chris Dibak and Vadym Doroshenko for helpful engineering support and interface suggestions for our library.*
原文を表示
Posted by Mónica Ribero Díaz, Research Scientist, Google Research

Differential privacy (DP) is a property of randomized mechanisms that limit the influence of any individual user’s information while processing and analyzing data. DP offers a robust solution to address growing concerns about data protection, enabling technologies across industries and government applications (e.g., the US census) without compromising individual user identities. As its adoption increases, it’s important to identify the potential risks of developing mechanisms with faulty implementations. Researchers have recently found errors in the mathematical proofs of private mechanisms, and their implementations. For example, researchers compared six sparse vector technique (SVT) variations and found that only two of the six actually met the asserted privacy guarantee. Even when mathematical proofs are correct, the code implementing the mechanism is vulnerable to human error.
However, practical and efficient DP auditing is challenging primarily due to the inherent randomness of the mechanisms and the probabilistic nature of the tested guarantees. In addition, a range of guarantee types exist, (e.g., pure DP, approximate DP, Rényi DP, and concentrated DP), and this diversity contributes to the complexity of formulating the auditing problem. Further, debugging mathematical proofs and code bases is an intractable task given the volume of proposed mechanisms. While *ad hoc* testing techniques exist under specific assumptions of mechanisms, few efforts have been made to develop an extensible tool for testing DP mechanisms.
To that end, in “DP-Auditorium: A Large Scale Library for Auditing Differential Privacy”, we introduce an open source library for auditing DP guarantees with only black-box access to a mechanism (i.e., without any knowledge of the mechanism’s internal properties). DP-Auditorium is implemented in Python and provides a flexible interface that allows contributions to continuously improve its testing capabilities. We also introduce new testing algorithms that perform divergence optimization over function spaces for Rényi DP, pure DP, and approximate DP. We demonstrate that DP-Auditorium can efficiently identify DP guarantee violations, and suggest which tests are most suitable for detecting particular bugs under various privacy guarantees.
**
DP guarantees
The output of a DP mechanism is a sample drawn from a probability distribution (*M* (*D*)) that satisfies a mathematical property ensuring the privacy of user data. A DP guarantee is thus tightly related to properties between pairs of probability distributions. A mechanism is differentially private if the probability distributions determined by *M* on dataset *D* and a neighboring dataset *D’*, which differ by only one record, are *indistinguishable* under a given divergence metric.
For example, the classical approximate DP definition states that a mechanism is approximately DP with parameters (*ε*, *δ*) if the hockey-stick divergence of order *eε*, between *M*(*D) *and *M*(*D’*), is at most *δ*. Pure DP is a special instance of approximate DP where *δ = 0*. Finally, a mechanism is considered Rényi DP with parameters (*훼*, *ε)* if the Rényi divergence of order *훼*, is at most *ε* (where *ε* is a small positive value). In these three definitions, *ε *is not interchangeable but intuitively conveys the same concept; larger values of *ε* imply larger divergences between the two distributions or less privacy, since the two distributions are easier to distinguish.
DP-Auditorium
DP-Auditorium comprises two main components: property testers and dataset finders. Property testers take samples from a mechanism evaluated on specific datasets as input and aim to identify privacy guarantee violations in the provided datasets. Dataset finders suggest datasets where the privacy guarantee may fail. By combining both components, DP-Auditorium enables (1) automated testing of diverse mechanisms and privacy definitions and, (2) detection of bugs in privacy-preserving mechanisms. We implement various private and non-private mechanisms, including simple mechanisms that compute the mean of records and more complex mechanisms, such as different SVT and gradient descent mechanism variants.
Property testers** determine if evidence exists to reject the hypothesis that a given divergence between two probability distributions, *P* and *Q*, is bounded by a prespecified budget determined by the DP guarantee being tested. They compute a lower bound from samples from *P* and *Q,* rejecting the property if the lower bound value exceeds the expected divergence. No guarantees are provided if the result is indeed bounded. To test for a range of privacy guarantees, DP-Auditorium introduces three novel testers: (1) HockeyStickPropertyTester, (2) RényiPropertyTester, and (3) MMDPropertyTester. Unlike other approaches, these testers don’t depend on explicit histogram approximations of the tested distributions. They rely on variational representations of the hockey-stick divergence, Rényi divergence, and maximum mean discrepancy (MMD) that enable the estimation of divergences through optimization over function spaces. As a baseline, we implement HistogramPropertyTester, a commonly used approximate DP tester. While our three testers follow a similar approach, for brevity, we focus on the HockeyStickPropertyTester in this post.
Given two neighboring datasets, *D* and *D’*, the HockeyStickPropertyTester finds a lower bound,*^δ* for the hockey-stick divergence between *M*(*D) *and *M*(*D’*) that holds with high probability. Hockey-stick divergence enforces that the two distributions *M*(*D) *and *M*(*D’*) are close under an approximate DP guarantee. Therefore, if a privacy guarantee claims that the hockey-stick divergence is at most *δ*, and*^δ* > *δ*, then with high probability the divergence is higher than what was promised on *D* and *D’* and the mechanism cannot satisfy the given approximate DP guarantee. The lower bound*^δ* is computed as an empirical and tractable counterpart of a variational formulation of the hockey-stick divergence (see the paper for more details). The accuracy of*^δ* increases with the number of samples drawn from the mechanism, but decreases as the variational formulation is simplified. We balance these factors in order to ensure that*^δ* is both accurate and easy to compute.
Dataset finders use black-box optimization to find datasets *D* and *D’* that maximize*^δ*, a lower bound on the divergence value *δ*. Note that black-box optimization techniques are specifically designed for settings where deriving gradients for an objective function may be impractical or even impossible. These optimization techniques oscillate between exploration and exploitation phases to estimate the shape of the objective function and predict areas where the objective can have optimal values. In contrast, a full exploration algorithm, such as the grid search method, searches over the full space of neighboring datasets *D* and *D’*. DP-Auditorium implements different dataset finders through the open sourced black-box optimization library Vizier.
Running existing components on a new mechanism only requires defining the mechanism as a Python function that takes an array of data *D* and a desired number of samples *n* to be output by the mechanism computed on *D*. In addition, we provide flexible wrappers for testers and dataset finders that allow practitioners to implement their own testing and dataset search algorithms.
**
Key results
We assess the effectiveness of DP-Auditorium on five private and nine non-private mechanisms with diverse output spaces. For each property tester, we repeat the test ten times on fixed datasets using different values of *ε*, and report the number of times each tester identifies privacy bugs. While no tester consistently outperforms the others, we identify bugs that would be missed by previous techniques (HistogramPropertyTester). Note that the HistogramPropertyTester is not applicable to SVT mechanisms.
Number of times each property tester finds the privacy violation for the tested non-private mechanisms. NonDPLaplaceMean and NonDPGaussianMean mechanisms are faulty implementations of the Laplace and Gaussian mechanisms for computing the mean.
We also analyze the implementation of a DP gradient descent algorithm (DP-GD) in TensorFlow that computes gradients of the loss function on private data. To preserve privacy, DP-GD employs a clipping mechanism to bound the l2-norm of the gradients by a value *G*, followed by the addition of Gaussian noise. This implementation incorrectly assumes that the noise added has a scale of *G*, while in reality, the scale is *sG*, where *s* is a positive scalar. This discrepancy leads to an approximate DP guarantee that holds only for values of *s* greater than or equal to 1.
We evaluate the effectiveness of property testers in detecting this bug and show that HockeyStickPropertyTester and RényiPropertyTester exhibit superior performance in identifying privacy violations, outperforming MMDPropertyTester and HistogramPropertyTester. Notably, these testers detect the bug even for values of *s* as high as 0.6. It is worth highlighting that *s *= 0.5 corresponds to a common error in literature that involves missing a factor of two when accounting for the privacy budget *ε*. DP-Auditorium successfully captures this bug as shown below. For more details see section 5.6 here.
Estimated divergences and test thresholds for different values of *s* when testing DP-GD with the HistogramPropertyTester (left) and the HockeyStickPropertyTester (right**).
**
Estimated divergences and test thresholds for different values of *s* when testing DP-GD with the RényiPropertyTester (left) and the MMDPropertyTester (right**)
To test dataset finders, we compute the number of datasets explored before finding a privacy violation. On average, the majority of bugs are discovered in less than 10 calls to dataset finders. Randomized and exploration/exploitation methods are more efficient at finding datasets than grid search. For more details, see the paper.
Conclusion
DP is one of the most powerful frameworks for data protection. However, proper implementation of DP mechanisms can be challenging and prone to errors that cannot be easily detected using traditional unit testing methods. A unified testing framework can help auditors, regulators, and academics ensure that private mechanisms are indeed private.
DP-Auditorium is a new approach to testing DP via divergence optimization over function spaces. Our results show that this type of function-based estimation consistently outperforms previous black-box access testers. Finally, we demonstrate that these function-based estimators allow for a better discovery rate of privacy bugs compared to histogram estimation. By open sourcing DP-Auditorium, we aim to establish a standard for end-to-end testing of new differentially private algorithms.
Acknowledgements
*The work described here was done jointly with Andrés Muñoz Medina, William Kong and Umar Syed. We thank Chris Dibak and Vadym Doroshenko for helpful engineering support and interface suggestions for our library.*
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み