{'fraction_non_alphanumeric': 0.056382785545669147, 'fraction_numerical': 0.010350463047031052, 'mean_word_length': 3.7601555747623165, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Privacy-Compatibility For General Utility Metrics

In this note, we present a complete characterization of the utility metrics that allow for non-trivial differential privacy guarantees.


Introduction
The field of data privacy is, at its heart, the study of tradeoffs between utility and privacy. The theoretical computer science community has embraced a strong and compelling definition of privacy -differential privacy [2,3] -but utility definitions, quite naturally, depend on the application at hand. For a given function f , can we achieve arbitrarily close to perfect utility by relaxing the privacy parameter sufficiently? We show that this question has a satisfyingly simple answer: yes, if and only if the image of f has compact completion. Furthermore, in this case there exists a single base measure µ such that conventional exponential mechanisms based on µ are capable of achieving arbitrarily good utility.

Definitions
We are given two metric spaces (X, ρ) and (Y, σ) and a continuous function f : X → Y. We think of the input database as being an element x ∈ X, and our goal is to disclose an approximation to the value of f (x) while preserving privacy. To allow for a cleaner exposition, we will assume throughout this paper that f has Lipschitz constant 1, i.e. σ(f (x), f (z)) ≤ ρ(x, z) for all x, z ∈ X. All of our results generalize to arbitrary Lipschitz continuous functions, an issue that we return to in Remark 2.4.
denotes the set of all Borel probability measures on Y . For a point x ∈ X, we will often denote the probability measure M(x) using the alternate notation M x . Definition 2.2. For ε > 0, we say that a mechanism M achieves ε-differential privacy if the following relation holds for every x, z ∈ X and every Borel set T ⊆ Y: For γ, δ > 0, we say that M achieves γ-utility with probability at least 1 − δ if the following relation holds for every x ∈ X: We abbreviate this relation by saying that M achieves (γ, δ)-utility.
Given a function f : X → Y, the privacy-utility tradeoff of f is the function ε * (γ, δ) = inf{ε > 0 | ∃ a mechanism M satisfying ε-differential privacy and (γ, δ)-utility}, where the right side is interpreted as ∞ if the set in question is empty.
Remark 2.4. In prior work on differential privacy, it is more customary to express differential privacy guarantees in terms of an adjacency relation on inputs, rather than a metric space on the inputs. In this framework, the sensitivity of f (the maximum of |f (a) − f (b)| over all adjacent pairs a, b) plays a pivotal role in determining the privacy achieved by a mechanism. The Lipschitz constant of f plays the equivalent role in our setting.
One could of course equate the two frameworks by defining the privacy metric ρ to be the shortest-path metric in the graph defined by the adjacency relation. This would equate the Lipschitz constant of f with its sensitivity. However, it is much more convenient to describe our mechanisms and their analysis under the assumption that f has Lipschitz constant 1; for any Lipschitz continuous f this can trivially be achieved by rescaling both ρ and the corresponding privacy bound by C, the Lipschitz constant of f .
Thus, for example, if one is given a function f and wishes to know whether there exists a mechanism achieving ε-differential privacy and (γ, δ)-utility, the answer is yes if and only if ε/ε * (γ, δ) is greater than the Lipschitz constant (i.e., sensitivity) of f . In cases where the sensitivity ∆ f depends on the number of points in an input database, N , the relation ε/ε * (γ/δ) ≥ ∆ f can be used to solve for N in terms of the parameters ε, γ, δ. For example, in many papers (e.g. [1]) ∆ f = 1/N and then we find that N = ε * (γ, δ)/ε is the minimum number of points in the input database necessary to achieve ε-differential privacy and (γ, δ)-utility.
Remark 2.5. Our definition of utility captures many prior formulations. For setings where the output space is simply R, the traditional utility metric reflecting the difference between the given answer and the true answer is easily captured in our framework. A variety of prior work on problems involving more complex outputs can also be cast as measuring utility in a metric space. For example, Blum et al. [1] propose utility with respect to a concept class H, and define the utility of a candidate output database y on an input x as max h∈H |h(x) − h(y)|. This setup can be viewed as mapping input databases x to vectors (h 1 (x), h 2 (x), . . .) and taking the utility metric σ to be the L ∞ metric on output vectors. Hardt and Talwar [4] use L 2 as their utility metric, but whereas they compute the mean square (or p-th moment) of its distribution, we define disutility to be the probability that the σ value exceeds γ. Definition 2.6. Given a measure µ on X, and a scalar β > 0, the (conventional) exponential mechanism C µ;β is given by the formula: provided that the denominator is finite. Otherwise C µ;β x is undefined. 2 The differential privacy guarantee for exponential mechanisms is given by the following theorem, whose proof parallels the original proof of McSherry and Talwar [5] and is given in the Appendix.
Theorem 2.7. If f has Lipschitz constant C then the conventional exponential mechanism C µ;β is (2Cβ)-differentially private for every µ.

A topological criterion for privacy-compatibility
A surprising result of Blum et al. [1] shows that, in the natural setting of one-dimensional range queries over continuous domains, no mechanism can simultaneously achieve non-trivial privacy and utility guarantees. What is it about this application that makes privacy fundamentally impossible? In this section, we introduce a definition of privacy-compatibility and give a complete characterization of the applications that satisfy this definition.
Suppose that f is Lipschitz continuous and that the metric space (X, ρ) is bounded. We now prove that f is privacy-compatible if and only if the completion of the metric space f (X) is compact. Observe that rescaling the metrics ρ, σ does not affect the question of whether f is privacy-compatible nor whether f (X) has compact completion, but it does rescale the Lipschitz constant of f and the diameter of X. Accordingly, we may assume without loss of generality that the Lipschitz constant of f and the diameter of X are both bounded above by 1, i.e.
for all x 1 , x 2 ∈ X.
Proof. For simplicity, throughout the proof we assume without loss of generality that Y = f (X). The notation B(y, r) denotes the ball of radius r around y in the metric space (Y, σ).
(3) ⇒ (2) For µ a uniformly positive measure on (Y, σ), and γ, δ > 0, let m = inf y∈Y µ(B(y, γ/2)) and let β = 2 γ ln 1 δm . We claim that the exponential mechanism M = M µ;β achieves (γ, δ)-utility. To see this, let x ∈ X be an arbitrary point, let z = f (x), and let We have Hence, for every x ∈ X, (4) ⇒ (3) We use the following fact from the topology of metric spaces: a complete metric space is compact if and only, for every r, if it has a finite covering by balls of radius r. (See Theorem A.2 in the Appendix.) For i = 1, 2, . . . , let C i = {y i,1 , . . . , y i,n(i) } be a finite set of points such that the balls of radius 2 −i centered at the points of C i cover Y. Now define a probability measure µ supported on the countable set C = ∪ ∞ i=1 C i , by specifying that for y ∈ C, µ(y) = i : y∈C i 1 2 i n(i) . Equivalently, one can describe µ by saying that a procedure for randomly sampling from µ is to flip a fair coin until heads comes up, let i be the number of coin flips, and sample a point of C i uniformly at random. We claim that µ is uniformly positive. To see this, given any r > 0 let i = ⌈log 2 (1/r)⌉, so that 2 −i ≤ r. For any point y ∈ Y, there exists some j (1 ≤ j ≤ n(i)) such that y ∈ B(y i,j , 2 −i ). This implies that B(y, r) contains y i,j , hence µ(B(y, r)) ≥ µ(y i,j ) ≥ 1 2 i n(i) . The right side depends only on r (and not on y), hence inf y∈Y µ (B(y, r)) is strictly positive, as desired.
(1) ⇒ (4) We prove the contrapositive. Suppose that the completion of Y is not compact. Once again using point-set topology (Theorem A.2) this implies that there exists an infinite collection of pairwise disjoint balls of radius r, for some r > 0. Let y 1 , y 2 , , . . . , be the centers of these balls. By our assumption that Y = f (X), we may choose points x i such that y i = f (x i ) for all i ≥ 1. Suppose we are given a mechanism M that achieves r-utility with probability at least 1/2. For every α > 0 we must show that M does not achieve α-differential privacy. The relation ∞ i=1 M x 1 (B(y i , r)) ≤ 1 implies that there exists some i such that The fact that M achieves r-utility with probability at least 1/2 implies that Combining (5) with (6) leads to hence M violates α-differential privacy.

A Appendix
Lemma A.1. If f : X → Y has Lipschitz constant 1, then the conventional exponential mechanism M µ;β achieves (2β)-differential privacy.
Proof. The proof follows the original proof of McSherry and Talwar [5]. The triangle inequality implies that for any x, z The inequality M x (T ) ≤ e 2βρ(x,z) M z (T ) follows upon taking the quotient of these two inequalities.
Theorem A.2. For a metric space (X, σ), the following are equivalent: 1. The completion of X is a compact topological space.
2. For every r > 0, X can be covered by a finite collection of balls of radius r.
3. For every r > 0, X does not contain an infinite collection of pairwise disjoint balls of radius r. Proof.
(2) ⇒ (1) Assume that property (2) holds. Recall that a metric space is compact if and only if every infinite sequence of points has a convergent subsequence, and it is complete if and only if every Cauchy sequence is convergent. Thus, we must prove that every infinite sequence x 1 , x 2 , . . . in X has a Cauchy subsequence. We can use a pigeonhole-principle argument to construct the Cauchy subsequence. In fact, the construction will yield a sequence of points z 1 , z 2 , . . . and sets S 1 , S 2 , . . . such that the diameter of S k is at most 1/k and z i ∈ S k for all i ≥ k; these two properties immediately imply that z 1 , z 2 , . . . is a Cauchy sequence as desired. The construction begins by defining S 0 = X. Now, for any k > 0, assume inductively that we have a set S k−1 such that the relation x i ∈ S k−1 is satisfied by infinitely many i. Let B 1 , B 2 , . . . , B n(k) be a finite collection of balls of radius 1 2k that covers X. There must be at least one value of j such that the relation x i ∈ S k−1 ∩ B j is satisfied by infinitely many i. Let S k = S k−1 ∩ B j and let z k be any point in the sequence x 1 , x 2 , . . . that belongs to S k and occurs strictly later in the sequence than z k−1 . This completes the construction of the Cauchy subsequence and establishes that the completion of X is compact.
(1) ⇒ (3) If X contains an infinite collection of pairwise disjoint balls of radius r, then the centers of these balls form an infinite set with no limit point in X, violating compactness.