{'fraction_non_alphanumeric': 0.04469616290702553, 'fraction_numerical': 0.008874689385871494, 'mean_word_length': 4.037880019509023, 'pattern_counts': {'":': 2, '<': 2, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Differential Privacy in Metric Spaces: Numerical, Categorical and Functional Data Under the One Roof

We study Differential Privacy in the abstract setting of Probability on metric spaces. Numerical, categorical and functional data can be handled in a uniform manner in this setting. We demonstrate how mechanisms based on data sanitisation and those that rely on adding noise to query responses fit within this framework. We prove that once the sanitisation is differentially private, then so is the query response for any query. We show how to construct sanitisations for high-dimensional databases using simple 1-dimensional mechanisms. We also provide lower bounds on the expected error for differentially private sanitisations in the general metric space setting. Finally, we consider the question of sufficient sets for differential privacy and show that for relaxed differential privacy, any algebra generating the Borel $\sigma$-algebra is a sufficient set for relaxed differential privacy.


Background
The rapid expansion of the Internet and its use in everyday life, alongside the growing understanding of the potential benefits of big data [4], has pushed data privacy to the forefront of research priorities since the turn of the millennium. Whether it be online, in the supermarket or at the hospital, corporations and governments are collecting vast quantities of data about our activities, the choices we make and the people we are in order to work more efficiently, increase profits and better serve our needs as consumers and citizens [5]. The challenge of making this potentially highly sensitive data publicly available where it can be put to good use is far from trivial and it is with this problem that the field of data privacy is concerned.
Various researchers and practitioners have considered applying anonymisation techniques to data sets such as removing explicit identifiers (name, address, telephone number, social security number, etc) while leaving quasi-identifiers 1 in place. While these anonymised data sets do indeed preserve participants' privacy in isolation, auxiliary/background information make this technique extremely vulnerable to attack [22]. A study by L. Sweeney in 2000 [28] found that as much as 87% of the US population (216 out of 248 million people) could be uniquely identified using only three quasi-identifiers (5-digit ZIP code, gender and date of birth). This meant census data could be linked to "anonymised" health records to determine the health status of unsuspecting patients.
Then in 2006, American media firm AOL released 20 million Internet search queries, with user numbers in place of other quasi-identifiers to protect users' identity. This shield of anonymity was not sufficient for privacy to be protected however, and the data was quickly removed from the public domain [2]. Similarly in 2008, A. Narayanan and V. Shmatikov [26] successfully de-anonymised entries in an anonymised data set containing movie ratings of 500,000 subscribers which was released by movie streaming website Netflix. The authors used the publicly-available Internet Movie Database as background information and were able to positively identify known users despite the absence of explicit identifiers in the Netflix data set. Initial anonymisation methods such as kanonymity [29] and l-diversity [22] have been shown to be vulnerable to attacks based on background information [22,21]. This fact has led to the development of a wide variety of more sophisticated approaches to publishing and mining data anonymously [23,24,25].
The work discussed above underlines the unsatisfactory nature of ad-hoc privacy solutions and the need for a solid theoretical foundation for privacy research. With this in mind, the concept of differential privacy was proposed in [8] to provide a formal, mathematical framework for analysing privacy-preserving data publishing and mining. The premise of differential privacy is that the outputs of queries to a database are unlikely to change substantially with the addition of a new participant's information. This means that outputs will be similar whether or not an individual participates in the database.
There is now a considerable body of work on differential privacy in the theoretical Computer Science literature [9]. Many of the paper in the literature concern data or queries of some particular type or on the development of particular algorithms that satisfy differential privacy. For instance, the design of differentially private algorithms for calculating singular vectors is considered in [10], while differentially private recommender systems are developed in [11]; in both of these instance, the data are naturally modelled as real numbers. Algorithms for search problems and learning are considered in [12,13]. A statistical perspective on differential privacy was developed in [14]; this paper considered real-valued ([0, 1] in fact) queries and data. In [15], mechanisms that maximise a suitable utility function were investigated; this paper assumed discrete finite-valued data spaces, which can of course describe categorical data. The recent paper [16] addressed the problem of optimal mechanisms that add noise independent of the data; the queries considered are real-valued. To date, the only major reference on differential privacy for functional data appears to be 1 A quasi-identifier is an attribute that is not sufficient to identify an individual by itself, but can do so when combined with other quasi-identifiers (e.g. gender, date of birth, etc.). [18]; in the same paper the authors emphasise the importance of being careful in selecting the measure space with respect to which probabilities are defined. In particular, if we choose our σ-algebra to be the trivial one consisting of the empty set and the entire space, then every mechanism is differentially private. The work of [20] and other similar papers on lower bounds for differentially private mechanisms considers real (or in some cases integer) valued data. Our aim is to describe a unifying framework for all major data and query types considered so far and to initiate a study of differential privacy in the formal setting of probability measures on metric spaces. This provides the machinery necessary for a rigorous discussion of random mechanisms and their accuracy. The major aims of the paper are to place the study of differentially private mechanisms within the framework of probability measures on metric spaces and to present some initial results in this direction.

Our Results
The principal contributions of this paper are the following.
• We consider differential privacy in the general framework of probability on metric spaces and highlight that it can be seamlessly applied to numerical, categorical and functional data.
• Our description shows how mechanisms based on database sanitisation and adding noise to query responses can be treated in a unified fashion.
• We describe techniques for generating families of (ǫ, δ) differentially private mechanisms from simpler mechanisms. One such example is given by sanitisation mechanisms generated from an (ǫ, δ) differentially private mechanism for the identity query. We also show how to generate differentially private mechanisms for high-dimensional databases using mechanisms for 1-dimensional databases.
• We describe lower bounds for the error in releasing a database in an (ǫ, δ)differentially private fashion using product sanitisations. This result applies to data drawn from any metric space in contrast to previous work, which has largely focussed on real and integer valued data.
• We consider the question of testing differential privacy and describe sufficient sets for (ǫ, δ) differential privacy.

Structure of paper
We begin in Section 2 by establishing the measure-theoretic framework for differential privacy. We then consider the question of sufficient sets for differential privacy in Section 3, address sanitisation mechanisms in Section 4 and focus on product sanitisations in Section 5. Section 6 considers accuracy and we give concluding remarks in Section 7.

Preliminaries
We first recall some standard concepts and results from probability and measure theory [3,27]. Given an algebra S of subsets of a set Ω, we use σ(S) to denote the smallest σ-algebra containing S and refer to σ(S) as the σ-algebra generated by S. A set Ω together with a σ-algebra of subsets of Ω is a measurable space. A monotone class M of subsets of some set Ω is defined by the following two properties: The next result, which appears as Theorem 3.4 in [3], characterises σ(S) as the smallest monotone class containing S. Given two measurable spaces (X, A X ) and (Y, Finally, for a measure µ on a measurable space (X, A X ), we recall the following simple fact.

Database Model
The individual entries of the databases we consider are elements of a set D ⊆ U where U is a metric space with metric ρ. We equip U with the Borel σ-algebra generated by the open sets in U (in the metric topology); D then naturally inherits a σ-algebra A D . A database d with n rows is given by a vector d = (d 1 , . . . , d n ) ∈ D n in which d i ∈ D is the ith row. Throughout, we assume that U n (and D n ) is equipped with the usual product σ-algebra A U n generated by {A 1 × · · · × A n : A i ∈ A U }. This ensures that projection maps π i : U n → U given by It is worth highlighting the generality of this setting: the metric space D can contain numerical, categorical or functional data; moreover, it can be discrete or continuous.
Example 1 If our data concern the hobbies or interests of people, we consider a set of all possible hobbies, denoted by H. For simplicity it is not unreasonable to assume that H is finite. Our data entries are then drawn from the power set D := 2 H of H, which will again be a finite set. There are various natural choices of metric in this case. We could consider the discrete metric on D in which ρ 1 (A, B) = 1 if A = B and 0 otherwise. Alternatively, we could choose the metric given by symmetric distance: In both of these cases, the Borel σ-algebra consists of all subset of D. Note that there is no requirement that each entry in a database in D n have the same size or cardinality, reflecting the fact that not all of us have the same number of interests or hobbies.
Example 2 In readings from field deployed sensors, each reading has a timestamp giving rise to time-course data. Another example is in smart metering where the supplier collects data from consumers giving electriciy consumption over a time-window. Data of this type is naturally represented as either a function or a sequence of real numbers. In our framework, we can take U to be a sequence space such as l ∞ or l 2 , or an appropriate function space such as where T represents the billing period (for instance). All of these spaces have natural norms defined on them (in fact they are all Banach spaces) and can be equipped with the Borel σ-algebra generated from the open sets in the norm topology.

We say that two databases
Remark: While we present our results for Hamming distance on D n , the results of Sections 3 and 4 are also valid with respect to other metrics ρ on D n where we define d ∼ d ′ if ρ(d, d ′ ) = 1. The work of Sections 5 and 6 relies on similarity being defined with respect to Hamming distance however.
For the most part, we assume that the data space D is compact. This is immediate if D is finite (as in Example 1) and is a natural assumption in most realistic situations. When D is compact, we denote by diam(D) the diameter of D: (1)

Query Model
We consider a very general query model. The set of all possible responses is assumed to be a metric space E Q with metric ρ Q and equipped with the Borel σ-algebra A Q . The query is then a measurable function, Q : Example 3 As with the data in d, queries are not restricted to take numerical values in this setting. For instance, if we consider Example 1 above, then we could consider a query asking for the number of people in the database who are interested in Classical Music or Football for instance: this would clearly be a numeric query. On the other hand, we could also request the 3 most common hobbies in the database, the output of which would be a set.
We next formally introduce the concept of a response mechanism within this general framework. Let (Ω, F , P) be a probability space. Given a collection of queries Q(n), a response mechanism is a set of measurable mappings Note that X Q,d is an E Q -valued random variable for each Q and d.

Sanitised Response Mechanisms
If there exists some family of measurable mappings such that for all d ∈ D n , then the mechanism given by (3) is a sanitised response mechanism. The motivation behind this choice of terminology is that the mechanism is generated by sanitising the database via the random variable X d before answering the query Q, i.e. non-interactive data release. If the database is sanitised by adding appropriate noise, the mapping X d takes the form X d = d + N for some U n -valued random vector N . Clearly, in order to define a mechanism by adding noise, it is necessary for U n to have a suitable algebraic structure: a vector space or monoid for example.

Output Perturbations
Mechanisms that provide Differential Privacy by perturbing the query response can be described as follows. Let a query Q : U n → E Q be given. Assume that there is a family of measurable functions {X q : Ω → E Q | q ∈ E Q }. The output perturbation mechanism is defined as In situations involving real-valued data, X q typically takes the form X q = q + N where N represents the noise added to the query response. For set-valued queries, X q can be defined by specifying some probability mass function on the collection of possible query responses.

Differential Privacy
In the interest of completeness and clarity, we now recall the definition of Differential Privacy and write it in the setting of this paper.
Definition 1 (Differential Privacy with Respect to a Query) Let ǫ ≥ 0, It is important to note that the relation d ∼ d ′ is symmetric, so inequality (5) is required to hold when d and d ′ are swapped.
Definition 2 (Differential Privacy) A response mechanism is (ǫ, δ)-differentially private with respect to Q(n) if it is (ǫ, δ)-differentially private with respect to every query Q 0 ∈ Q(n).
The above definitions are often referred to as relaxed differential privacy; the original notion of differential privacy introduced in [8] considers the case where δ = 0.
The expected error of a mechanism (2) for a query Q on a database d is given by the expectation E[dist(X Q,d , Q(d))].

Sufficient Sets for Differential Privacy
In this brief section, we consider the following question: is there a strict subset S of A Q such that if (5) is satisfied for all A in S, it is guaranteed to be satisfied for all A in A Q ? We refer to such a set as a sufficient set for differential privacy.
Depending on the application, the query output space may be a subset of R n or of a sequence or function space such as C([0, T ]). A key question for the practical deployment of differentially private mechanisms is how to determine if a mechanism is in fact (ǫ, δ)-differentially private. Testing (5) on the entire σ-algebra is clearly a prohibitively difficult task. Our next result shows that it is sufficient to test this condition on any algebra S ⊂ A Q that generates A Q .
Theorem 3 Let a response mechanism (2) and a query (E Q , A Q , Q) be given and let S ⊂ A Q be an algebra such that σ(S) = A Q . If (5) holds for all sets A ∈ S, then it holds for all sets A ∈ A Q .
Proof: Let B denote the collection of sets in E Q for which (5) holds. By assumption, S ⊆ B. Now let A 1 , A 2 , . . . be any collection of sets in B with for all i. As the sequence A i is increasing, it now follows from Proposition 1 that and soĀ ∈ B. An identical argument shows that for any sequence {A i } of sets in B with A i ⊇ A i+1 for all i, andĀ = ∩ i A i ,Ā ∈ B. Taken together these two observations imply that B is a monotone class. Moreover, S ⊆ B. The result now follows immediately from Theorem 1.
These mappings are measurable with respect to the usual Borel σ-algebra on R k and hence we can define the R k -valued mechanism X t1,...t k Q,d = π t1,...,t k • X Q,d . We claim that if the finite-dimensional mechanisms X t1,...t k Q,d are (ǫ, δ)-differentially private for all k and t 1 , . . . , t k , then the mechanism X Q,d is (ǫ, δ)-differentially private. The argument to show this is as follows. From the assumption on the finite-dimensional mechanisms, it follows immediately that (5) holds for all (so-called cylinder sets) sets A of the form where B is a Borel set in R k . These sets form an algebra and it follows from Theorem VII.2.1 (page 212) of [17] that the σ-algebra they generate is the Borel σ-algebra of C([0, 1]). It follows immediately from Theorem 3 that X Q,d defines an (ǫ, δ)-differentially private mechanism on C([0, 1]) as claimed.

Sanitisation Mechanisms and the Identity Query
A popular approach to designing differentially private response mechanisms is to add noise to the query response Q(d). It is known however, that this can lead to privacy compromises by averaging a large number of responses to an identical query [9], unless the number or type of queries that can be asked is restricted. We now show that if a sanitisation mechanism (3) is (ǫ, δ)-differentially private with respect to the identity query, then it is (ǫ, δ)-differentially private with respect to any query. It is important to appreciate that we place no restrictions on the query Q; it could map into a sequence space such as l ∞ and represent an infinite sequence of individual queries for example. The identity query is defined by the identity map on the ambient space U n . In sanitised response mechanisms, the "perturbed database" X d (ω) is disclosed by the response to the identity query. However, disclosing X d (ω) need not disclose the original database d provided that an appropriate privacypreserving perturbation has been applied. Importantly, if (ǫ, δ)-differential privacy is achieved with respect to query I n , then the response to any query is (ǫ, δ)-differentially private.
Theorem 4 (Identity Query) Consider a sanitised response mechanism as defined in (3). Suppose this response mechanism is (ǫ, δ)-differentially private with respect to the identity query. Then it is (ǫ, δ)-differentially private with respect to any query (E Q , A Q , Q).
Proof: Let d, d ′ be two elements of D n with d ∼ d ′ . By assumption, for all E ∈ A U n . Let a query (E Q , Q, A Q ) and A ∈ A Q be given. As Q is measurable, Q −1 (A) ∈ A U n . Then, using (6), Thus, the mechanism satisfies (ǫ, δ)-differential privacy with respect to Q also.
Corollary 1 Consider a sanitised response mechanism as defined in (3) and suppose I n ∈ Q(n). Then this response mechanism is (ǫ, δ)-differentially private with respect to I n if and only if it is (ǫ, δ)-differentially private with respect to every query Q ∈ Q(n).
Proof: "⇒": Theorem 4. "⇐": The response mechanism is (ǫ, δ)-differentially private with respect to every query Q ∈ Q(n) by assumption, therefore it must be (ǫ, δ)-differentially private with respect to the identity query I n , since I n ∈ Q(n).
Observe that the number and details of queries Q ∈ Q(n) do not need to be specified in advance for Theorem 4 to hold, and so queries may be interactive and unlimited in number. This highlights a fundamental difference between privacy mechanisms that perturb the query response (e.g. by adding Laplacian or Gaussian noise) vs privacy mechanisms that perturb the database itself. Namely, in the former the added noise can be averaged out by an adversary repeating a query multiple times, thereby requiring a limit to be placed on the number of queries allowed, while in the latter an averaging attack of this sort is impossible; a repeated query will simply receive the same answer each time.

Product Sanitisations
In this section, we derive a result that relates differentially private sanitisationbased mechanisms for n-dimensional databases in D n to mechanisms for simple 1-dimensional databases.
Before showing how differentially private sanitisation mechanisms for databases in D n can be constructed from simple mechanisms for databases in D, we first establish a number of technical results. where Proof: We need to prove equality and disjointness of the decomposition.
Then there exists at least one I * ⊆ {1, . . . , p} such that (a, b) ∈ i∈I * A i × i∈I * B i \ i / ∈I * B i . Hence a ∈ A i for at least one i ∈ I * and b ∈ B i for all i ∈ I * and so there exists at least one i ∈ I * such that (a, b) ∈ A i × B i and so (a, b) ∈ p i=1 (A i × B i ). Finally, we show that B I ∩ B J = ∅ if I = J. To see this, note that if I = J, then we can without loss of generality assume that there is some index k ∈ I that is not in J. Then any x ∈ B I must be in B k . However, as k ∈ J C , it follows that x ∈ ∪ i / ∈J B k and hence that x / ∈ B J . This shows that the intersection is empty as claimed.
For future use, we note that an analogous argument to that given above can be used to show the following. A 1 , . . . , A p , B 1 , . . . , B p be two collections of non-empty sets. Then the finite union

Lemma 2 Let
For the remainder of this section we consider a special form for the database sanitisation X d (ω). Suppose a family {X d : Ω → U | d ∈ D} of measurable mappings is given. Define the mechanism X d for d = (d 1 , . . . , d n ) by where the X i d are independent and X i d has the same distribution as X di , for all d ∈ d n , i ∈ {1, . . . , n}.
We first note the following lemma concerning such mechanisms.
Lemma 3 Let a family {X d : Ω → U | d ∈ D} of measurable mappings be given and let X d be defined by (7). If X d is (ǫ, δ)-differentially private then . . , d n ) for any choice of d 2 , . . . , d n in D. As X d is (ǫ, δ)-differentially private and the projection π 1 : U n → U onto the first coordinate is measurable, it follows that for A ∈ A U : We next note that the converse of this result also holds.
Theorem 5 Consider a family {X d : Ω → U | d ∈ D} of measurable mappings and assume that for all d, d ′ ∈ D, A ∈ A U . Let X d be as defined in (7). Then, for all d ∼ d ′ ∈ D n and all A ∈ A U n .
Proof: We shall use induction on n. By assumption, the result is true for n = 1. Let n > 1 be given and assume that the result is true for all k ≤ n − 1.
Assume that d and d ′ differ in the first element so where A i ∈ A U , B i ∈ A U n−1 , be given. It follows from Lemma 1 that we can write where A i ∈ A U , B i ∈ A Un−1 for 1 ≤ i ≤ q and B i ∩ B j = ∅ for i = j. Then, using the fact that the sets B i are disjoint and the independence of the components of X d , X d ′ , . . , d ′ n ) and we can use Lemma 2 and the induction hypothesis to conclude that Thus for any set R of the form (8), we can conclude that In particular, (10) holds for all elementary sets R ∈ A D n . A similar argument to that used in the proof of Theorem 3 shows that the collection of all sets satisfying (10) is a monotone class; furthermore this collection of subsets contains the elementary sets. The result now follows from Theorem 2.
Remark: In the following subsection, we describe some simple applications of Theorem 5. It is worth noting that it applies to any database space D ⊆ U , and to discrete spaces in particular. For mechanisms of the form (7), it simplifies the task of testing the mechanism for differential privacy considerably. For instance, if D is a finite set with |D| elements, then it is only necessary to check (5) for all |D| 2 pairs of elements of D and all 2 |D| subsets of D to ensure differential privacy on D n . In general, we would have n |D| 2 |D| n−1 pairs of neighbouring elements and 2 |D| n subsets to worry about!

Examples
Example 5 Inspired by a now standard approach to designing differentially private mechanisms, we first consider a sanitisation mechanism for real-valued databases in which Laplacian noise is added to each element of the database. Recall that a Laplacian random variable X : Ω → R with mean zero and variance 2b 2 has a probability density function (PDF) is given by where L : Ω → R is a Laplacian random variable with mean zero and variance 2b 2 such that The resulting sanitised response mechanism corresponding to (7) is (ǫ, δ)-differentially private for any database in D n . To see this, note that by Theorem 5, it is sufficient to show that for all d, d ′ ∈ D, A ∈ B(R), where B(R) denotes the Borel σ-algebra on the real line R. Using the triangle inequality, |x − d ′ | ≤ |x − d| + |∆| where ∆ = d ′ − d, and so it is sufficient to show that Of course, keeping in mind that the l 1 sensitivity of the identity query [9] is precisely given by diam(D), this example can be seen as an application of the well-known Laplacian mechanism to the identity query.
Example 6 Consider again our earlier example where D = 2 H represents the sets of possible hobbies or interests of people. As noted earlier, it is reasonable to assume that D contains finitely many elements; we denote |D| = m + 1. Following Theorem 5 we will construct a mechanism for 1-dimensional databases: this can then be used to define a mechanism for databases in D n via (7).
For d ∈ D, consider the D-valued random variable X d with probability mass function: We make the reasonable assumption that 1 − pm > p. For (ǫ, δ)-differential privacy, we need the following to hold: where A ⊆ D and d, d ′ ∈ D.
We claim that (11) will hold if and only if This condition is clearly necessary as can be seen by considering the singleton set A = {d}. To see that it is also sufficient let d, d ′ ∈ D and A ⊆ D be given. There are 4 cases to consider.

Accuracy
In this section, we consider the question of accuracy for product sanitisations. The literature on the interaction between privacy and accuracy is considerable and previous work has considered examples such as count queries [19], contingency table marginals [1] and spatial data [6]. As product sanitisations are constructed from 1-dimensional mechanisms, we focus on the error of these basic mechanisms here. These results can then be used to derive bounds for data in D n ; the precise form these bounds will take depends on how the metric is constructed on D n . We wish to emphasise two points about our work: we are considering a very general class of databases that can incorporate numerical, categorical and functional data; we consider (ǫ, δ)-differential privacy and are not assuming δ = 0.
As ρ(·, d) is a continuous function on D for any fixed d, it is measurable with respect to the Borel σ-algebra on D. It follows that ρ(X d , d) is a nonnegativevalued random variable. We define the maximal expected error E as: For r > 0 and x ∈ D, B r (x) denotes the open ball We first note that for any differentially private mechanism with δ < 1, E > 0. If δ = 1, then any mechanism is differentially private.
Lemma 4 Let a family {X d : Ω → U | d ∈ D} of measurable mappings be given, let 0 ≤ δ < 1 and assume that for all d, d ′ ∈ D, A ∈ A U . Then E > 0.
As ρ(x, u) ≥ r > 0 for all x ∈ B r (v), it follows that E [ρ(X u , u)] > 0 unless However, if this is the case then P(ρ(X v , v) ≥ r) = 1 − δ > 0 and hence This completes the proof. We now present two simple results giving lower bounds for E. The argument for the following result is inspired by that used to establish Theorem 3.3 of [20].
Theorem 6 Let a family {X d : Ω → U | d ∈ D} of measurable mappings satisfying (14) be given. Then Proof: Without loss of generality, we may assume that E is finite. Moreover, from Lemma 4 we know that E > 0. As D is compact, there exist points u, v in D with ρ(u, v) = diam(D). Set t = diam(D)

2E
; then tE = diam(D) 2 and the balls B tE (u), B tE (v) are disjoint. From Markov's inequality applied to the non-negative random variable ρ(X u , u), it follows that .
It is now immediate that .
From (14) we know that Combining (18), (19) and noting that (17) also holds with u replaced by v, we see that and after a simple rearrangement of terms we see that as claimed.
The previous result applies to any compact metric space D. Now assume that D is discrete so that there exists some κ > 0 such that ρ(x, y) ≥ κ ∀x, y ∈ D.
This combined with D being compact immediately implies that D is finite. A straightforward alteration of the argument of Theorem 6 yields the following result.
Theorem 7 Let D be finite with |D| = m + 1 and κ = min d,d ′ ∈D ρ(d, d ′ ). Let a family {X d : Ω → U | d ∈ D} of measurable mappings be given satisfying (14). Then Proof: It is trivial that the m + 1 balls B tE (u), u ∈ D are all disjoint where t = κ E . Fix some u ∈ D. By the same reasoning as in the proof of Theorem 6, Moreover, there must exist some v = u such that Choose one such v and apply (14) to obtain P(X u ∈ B tE (v)) ≥ e −ǫ (P(X v ∈ B tE (v)) − δ) .
As in the proof of Theorem 6, we can now conclude that Rearranging this inequality gives us that Example 7 Consider again Example 6. We have shown that there exists an (ǫ, δ)-differentially private mechanism with p = 1−δ m+e ǫ where |D| = m + 1. If D is equipped with the discrete metric so that ρ(d, d ′ ) = 1 for all d = d ′ , then κ = 1 and for any d, the expected value of ρ(X d , d) for this mechanism is given by So the bound given by Theorem 7 is tight in this simple case.

Concluding Remarks
We have considered differential privacy in the setting of probability on metric spaces with mechanisms viewed as measurable functions taking values in output query spaces. We have demonstrated that this framework allows mechanisms based on sanitisation and output perturbation to be treated in a uniform manner; moreover we have presented examples to highlight that categorical, functional and numerical data can be treated in this setting. For sanitisation mechanisms, a formal proof that differential privacy with respect to the identity query guarantees differential privacy with respect to any measurable query has been given. We have also introduced the problem of determining sufficient sets for differential privacy, shown that a generating algebra of sets is a sufficient set and applied this fact to functional data in the space C([0, 1]) of continuous functions on [0, 1]. In the latter half of the paper, we have focussed on product sanitisations of the form (7); we have shown that these mechanisms are (ǫ, δ)differentially private if and only if the 1-dimensional mechanism used to define them is. This result was then applied in two contexts: to provide a condition for the well-known Laplacian mechanism to be differentially private; and to give a simple example of a differentially private mechanism for discrete categorical data. Finally in Section 6, two simple results giving lower bounds for the maximal expected error for (ǫ, δ) differentially private mechanisms on metric spaces were presented.