<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Improved Differential Privacy for SGD via Optimal Private Linear Operators on Adaptive Streams</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>2022</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10382925</idno>
					<idno type="doi"></idno>
					<title level='j'>Advances in neural information processing systems</title>
<idno>1049-5258</idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Sergey Denissov</author><author>Hugh Brendan McMahan</author><author>J Keith Rush</author><author>Adam Smith</author><author>Abhradeep Guha Thakurta</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Motivated by recent applications requiring differential privacy over adaptive streams, we investigate optimal instantiations of the matrix mechanism [1] in this setting. We prove fundamental theoretical results on the applicability of matrix factorizations to adaptive streams, and provide a parameter-free fixed-point algorithm for computing optimal factorizations. We instantiate this framework with respect to concrete matrices which arise naturally in machine learning, and train user-level differentially private models with the resulting optimal mechanisms, yielding significant improvements in a notable problem in federated learning with user-level differential privacy.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction and background</head><p>An important setting for private data analysis is that of streaming inputs and outputs-often dubbed continual release. Hiding individual information is especially challenging in such settings since the arrival of one person's data may affect all future outputs of the system. A significant line of work formalizes differential privacy (DP, <ref type="bibr">[2]</ref>) under continual release and builds algorithms that meet the resulting definition (e.g. <ref type="bibr">[3]</ref><ref type="bibr">[4]</ref><ref type="bibr">[5]</ref><ref type="bibr">[6]</ref><ref type="bibr">[7]</ref><ref type="bibr">[8]</ref>). One prominent application of private, continual-release algorithms is to adapt iterative optimization algorithms such as SGD so that their outputs satisfy DP <ref type="bibr">[7,</ref><ref type="bibr">6,</ref><ref type="bibr">9]</ref>.</p><p>The problem of privately computing cumulative sums plays a key role in both theory and applications. Given a set of input vectors (e.g., gradients) g 1 , . . . , g n with g i 2 R d , the task is to approximate the sequence of prefix sums (g 1 , g 1 + g 2 , . . . , g 1 + &#8226; &#8226; &#8226; + g n ) while satisfying DP. Solutions to this task form the core building block in DP algorithms for online PCA <ref type="bibr">[10]</ref>, online marginal estimation <ref type="bibr">[4,</ref><ref type="bibr">3,</ref><ref type="bibr">11]</ref>, online top-k selection <ref type="bibr">[12]</ref>, and training ML models <ref type="bibr">[13,</ref><ref type="bibr">6,</ref><ref type="bibr">14]</ref>, among others. For example, a common approach to private optimization is to add noise to the gradient estimates in SGD <ref type="bibr">[15]</ref><ref type="bibr">[16]</ref><ref type="bibr">[17]</ref>. Kairouz et al. <ref type="bibr">[6]</ref> make the observation that the key DP primitive in such contexts is not the independent estimation of individual gradients, but rather the accurate estimation of cumulative sums of gradients. Lowering the error of the DP algorithm's approximation to the cumulative sum translates directly to improved optimization. <ref type="foot">1</ref>The structure of continual-release algorithms imposes two major constraints: first, the algorithm must be computable online-that is, we must produce the output at a given time using only prior inputsand second, privacy analysis must account for adaptively defined inputs-that is, the guarantee should hold even against an adversary that selects inputs based on all previous outputs of the system. In learning applications, the privacy analysis must be adaptive even when the stream or raw training examples is fixed in advance, because the points at which we compute gradients depend adaptively on the output of the mechanism so far <ref type="bibr">[14]</ref>.</p><p>In this paper, we revisit the design of continual-release algorithms for cumulative sums and related problems. We give new tools for analyzing privacy in the adaptive setting, new methods to design optimal (within a class) algorithms for summation-style problems, and applications to central problems in private machine learning. Although we focus on learning as the primary application of our algorithmic and analytic tools, our techniques apply to a wide range of private computations over streaming data such as online monitoring <ref type="bibr">[18,</ref><ref type="bibr">19]</ref>, tracking distributional changes over data streams <ref type="bibr">[20]</ref>, and detection of emerging trends <ref type="bibr">[21]</ref>.</p><p>Prior Approaches Prior approaches to DP approximation of cumulative sums fall broadly into two categories. First, in streaming settings, existing work is generally based on the binary-tree estimator <ref type="bibr">[4,</ref><ref type="bibr">3]</ref>. This estimator embeds the values to be summed as leaf nodes in a complete binary tree T , with internal nodes representing the sum of all leaves below them. The mechanism views the entire tree as the object to be privately released (ensuring privacy by adding independent noise to each node). An important refinement of Honaker <ref type="bibr">[22]</ref> leverages the multiple independent noisy observations of correlated values to produce lower-variance estimates of the prefix sums. Kairouz et al. <ref type="bibr">[6]</ref> apply Honaker's online variant, dubbed Honaker Online, to the follow-the-regularized-leader approach to optimization <ref type="bibr">[23]</ref><ref type="bibr">[24]</ref><ref type="bibr">[25]</ref>. The tree structure of these mechanisms allows for privacy analysis in the adaptive setting, as observed by <ref type="bibr">[14]</ref> and formalized by <ref type="bibr">[8]</ref>.</p><p>The second, more general approach to cumulative sums has previously only been applied in offline settings, in which the input is received and outputs are produced as a single batch. The idea is to view cumulative sums as a special case of linear query release (since each output is a pre-specified linear combination of the inputs). In the offline setting, the tree-based approaches can be viewed as instantiations of this widely-studied factorization framework (as in, for example, <ref type="bibr">[26,</ref><ref type="bibr">1,</ref><ref type="bibr">[27]</ref><ref type="bibr">[28]</ref><ref type="bibr">[29]</ref>). To introduce the general matrix factorization approach, consider the task of computing a private estimate of a linear mapping G 7 ! AG defined by matrix A 2 R n&#8677;n (assumed to be full-rank throughout this work). Given any factorization A = BC, a DP estimate of AG can be computed as</p><p>where Z represents a sample from a noise distribution D. Choosing D in a way that appropriately depends on the sensitivity of the map G 7 ! CG, one can prove privacy of the noised vector CG + Z, and hence of the mapping G 7 ! d AG. For example, in the case of cumulative sums, the matrix A is the lower-triangular matrix S with 1's on and below the diagonal; the binary tree mechanisms correspond to a matrix C T with one row per tree node (see Appendix A and Appendix C respectively). A typical choice for the noise Z is to select it from a spherical Gaussian distribution.</p><p>A focus of existing work (e.g. <ref type="bibr">[1,</ref><ref type="bibr">[27]</ref><ref type="bibr">[28]</ref><ref type="bibr">[29]</ref>) is to choose the factorization BC to optimize some measure of overall accuracy (such as total mean squared error) subject to a privacy constraint. However (with the exception of the independent, parallel work of Fichtenberger et al. <ref type="bibr">[30]</ref> <ref type="foot">foot_1</ref> ), streaming constraints and adaptive privacy were not explicitly considered. In the streaming setting, one naturally requires the i th element (row) of AG to be computable using only the first i elements (rows) of G. This corresponds to requiring that the linear operator of interest A has a lower-triangular structure when represented as a matrix, a requirement that is met by all the matrices under consideration in this work. Distributing the B in Eq. (1), we see d AG = AG + BZ. As long as AG is lower triangular, then, any matrix mechanism can be implemented by an online algorithm, via the distribution induced by BZ. However, this observation does not address a key problem: under what conditions is the resulting mechanism adaptively private? The applications to optimization raise their own set of critical questions: How can we efficiently compute such factorizations? Which linear operators are the appropriate ones to factorize in the case of SGD? Finally, can these factorizations actually produce improved privacy/accuracy tradeoffs for real-world machine learning tasks?</p><p>Contributions We provide a deeper understanding of the matrix mechanism in the adaptive streaming setting. We show that if Z in Eq. ( <ref type="formula">1</ref>) is drawn from a Gaussian distribution of appropriately computed variance, then the resulting mechanism is differentially private in the adaptive streaming setting, independent of the structure of B and C. We make an explicit connection here with the easier-to-see privacy under adaptive streams of lower-triangular factorizations. Furthermore, we show that this property is specific to the Gaussian mechanism, and does not extend to arbitrary noise distributions.</p><p>For natural notions of error and adjacency specified in Section 3, we present a fast and parameter-free fixed-point algorithm for computing optimal factorizations and prove a local convergence guarantee for this algorithm, leveraging representations of optimal factorizations which are to our knowledge novel in the literature on the matrix mechanism. The optimal computed factorizations show a significant improvement over existing state-of-the-art private streaming prefix sum methods <ref type="bibr">[22]</ref>, additionally removing the artifacts of the binary tree data structure (see Fig. <ref type="figure">1</ref>). Furthermore, our fixed-point algorithm can be two orders of magnitude more computationally efficient than existing optimization methods for the matrix mechanism <ref type="bibr">[27]</ref> (though we did not explicitly compare to McKenna et al. <ref type="bibr">[28]</ref>), and provides a direct bound on the duality gap which allows precise stopping criteria.</p><p>Going beyond prefix sums (which correspond to constant learning rate SGD as noted above), we construct matrix mechanisms that directly encode more sophisticated optimization algorithms as linear operators on gradients: in particular, arbitrary combinations of (data independent) learning rate schedules and momentum.</p><p>We compute optimal factorizations of these general matrices via fixed-point iterations, and use them to train user-level differentially private language models on a canonical federated learning benchmark, showing that these factorizations significantly improve the privacy/utility curve (in fact, closing 2/3rds of the gap to non-private training left by the previous state-of-the-art for single pass algorithms). For prefix sums, we show computationally-efficient structured matrices provide high-fidelity approximations to the optimal matrices, allowing implementations to scale essentially independent of the number of iterations n.</p><p>Notation and conventions Matrices will be denoted by bolded capital letters (e.g. A, B), with some symbols reserved for special matrices, notably S (prefix sums) and M (momentum, defined in Section 4 and illustrated in Appendix A). Vectors will be denoted by bolded lowercase letters (e.g. x, y). For a real symmetric matrix A, the smallest and the largest eigenvalues are denoted by min (A) and max (A). For a matrix A, A &#8676; denotes the conjugate transpose and A &#8224; denotes the Moore-Penrose pseudoinverse; a star as in X ? indicates a matrix that is optimal in a way made clear by context. diagpart represents the operation of taking the diagonal elements of a matrix; diag represents embedding a vector argument on the diagonal of a matrix. Additional notation is summarized in Appendix A.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Privacy for adaptive streams</head><p>In this section, we provide structural results that clarify the classes of mechanisms/algorithms for cumulative sums and other linear computations in the continual release model <ref type="bibr">[4,</ref><ref type="bibr">3]</ref> that remain private even when the inputs stream is defined adaptively. In the continual release model, a mechanism receives a stream of inputs G = [g 1 , . . . , g n ] and produces a stream of outputs a 1 , ..., a n , where output a i is intended to approximate some function of the prefix g 1 , ..., g i and must be generated before g i+1 is received. We specify which parts of the input can depend on a single person's data via a neighbor relation N on data streams. Two streams are neighbors if they differ in one person's data. For example, if one person's data directly affects exactly one input in the stream ("event-level privacy"), then we say two data streams are neighboring if they differ in exactly one element (that is, they are at Hamming distance 1).</p><p>The original works on continual release analyzed privacy in a nonadaptive model: a mechanism M is (", )-differentially private <ref type="bibr">[31,</ref><ref type="bibr">32]</ref> for nonadaptive continual release if, for all pairs of adjacent data streams G, H, the corresponding distributions on output streams M(G) and M(H) are (", )indistinguishable, denoted M(G) &#8673; ", M(H). That is, for all events E, we have</p><p>of this definition tailored to differentially private gradient descent, with a precise instantiation of the neighborhood notion is presented in Definition J.1 in the appendix.)</p><p>In many use cases-including those arising in iterative gradient-based optimization algorithms-the nonadaptive model is inadequate, since the inputs g i may be generated in real time as a function of previous outputs a 1 , ..., a i 1 . To summarize the more general, adaptive definition <ref type="bibr">[14,</ref><ref type="bibr">8]</ref>, consider an adversary that adaptively defines two input sequences G = (g 1 , . . . , g n ) and H = (h 1 , . . . , h n ). The adversary must satisfy the promise that these sequences correspond to neighboring data sets. The privacy game proceeds in rounds. At round t, the adversary generates g t and h t . The game accepts these if the input streams defined so far are valid, meaning that there exist completions (g t+1 , ..., gn ) and ( ht+1 , ..., hn ) so that ((g 1 , ..., g t , gt+1 , ..., gn ), (h 1 , ..., h t , ht+1 , ..., hn )) 2 N . For example, in the case of event-level privacy, the game simply checks that the two streams differ in at most one position so far.</p><p>The game is parameterized by a bit side 2 {0, 1} which is unknown to the adversary but constant throughout the game. The game hands either g t or h t to the mechanism M, depending on side. The mechanism's output a t is then sent to the adversary. The privacy requirement is that the adversary's views with side = 0 and side = 1 be (", ) indistinguishable. One can substitute other relevant notions of indistinguishability like those from CDP <ref type="bibr">[33,</ref><ref type="bibr">34]</ref>, Renyi DP <ref type="bibr">[35]</ref>, or Gaussian DP <ref type="bibr">[36]</ref>. The mechanisms we consider generally satisfy Gaussian DP.</p><p>The nonadaptive version of the definition is weaker but easier to work with. It is therefore natural to look for classes of mechanisms for which the two definitions are equivalent (and thus for which a nonadaptive privacy proof implies the more general guarantee). We first observe that such a transfer statement holds for "pure" "-DP (in which = 0). We defer all the proofs to Appendix D. Proposition 2.1. Every mechanism that is (", 0) nonadaptively DP in the continual release model satisfies the adaptive version of the definition, with the same parameters.</p><p>Unfortunately, not all privacy proofs for the nonadaptive model transfer to the adaptive setting. Indeed, we show that there are additive-noise mechanisms (which simply add noise from a predefined distribution to some function of the data) that are nonadaptively (", )-DP, but not private in the adaptive setting (Appendix D.1).</p><p>Adaptive privacy for Gaussian noise addition mechanisms In Theorem 2.1 we show that every matrix mechanism with Gaussian noise addition that is (", )-DP in the nonadaptive model is also private in the adaptive setting: Theorem 2.1. Let A 2 R n&#8677;n be a lower-triangular full-rank query matrix, and let A = BC be any factorization with the following property: for any two neighboring streams of vectors G , H 2 R n&#8677;d , we have kC(G H)k F &#63743; &#63743;. Let Z &#8672; N (0, &#63743; 2 2 ) n&#8677;d with large enough so that M(G) = AG + BZ = B(CG + Z) satisfies (", )-DP (or &#8674;-zCDP or &#181;-Gaussian DP) in the nonadaptive continual release model. Then, M satisfies the same DP guarantee (with the same parameters) even when the rows of the input are chosen adaptively.</p><p>To prove this we crucially use the rotational invariance of spherical Gaussian distribution, yielding distributional equivalence of an orbit of mechanisms: those factorizations expressible as BUU &#8676; C for U unitary. This observation can similarly be leveraged to show a subtly distinct fact: Proposition 2.2. For any factorization A = BC where A is lower-triangular, there exists a factorization A = b B b C which induces a distributionally equivalent matrix mechanism under Gaussian noise with b B and b C lower triangular. This factorization can be explicitly computed from A = BC via an appropriate LQ decomposition. Normalizing to all-nonnegative entries on the diagonal, this factorization is unique.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Computing optimal factorizations</head><p>Once one writes down the matrix mechanism as in Eq. ( <ref type="formula">1</ref>), it is natural to seek factorizations that minimize the error d AG AG in some metric of choice. In this section we consider the expected squared reconstruction error of the estimate d AG, which has previously been noted as an appropriate formulation of error for the setting of training private ML models <ref type="bibr">[6,</ref><ref type="bibr">Theorem 5]</ref>. Further, for simplicity we restrict our attention to the single-pass setting. That is, for the remainder of the paper we will assume: Definition 3.1. Two data matrices G and H in R n&#8677;d will be considered to be neighboring if they differ by a single row, with the `2-norm of the difference in this row at most &#8675;.</p><p>Under this notion of sensitivity, one can make the estimation of any query AG (", )-DP via Theorem 3.1, which via Theorem 2.1 immediately extends to adaptive streams. It is worth mentioning that while we state the analytic vairance for the Normal distribution to satisfy (", )-DP, in practice we arrive at the required (and tighter) variance via empirical privacy accounting methods like zero concentrated DP (zCDP) accounting <ref type="bibr">[33]</ref>, or privacy loss distribution (PLD) accounting <ref type="bibr">[37]</ref>. Theorem 3.1 (Adapted from <ref type="bibr">[1]</ref>). Consider a query matrix A 2 R n&#8677;n along with a fixed factorization A = B n&#8677;n C n&#8677;n with = max i2[n] C [:,i] 2 , the maximum column norm of C. Let G 2 R n&#8677;d be a fixed (non-adaptive) data matrix with each row of G having `2-norm at most &#8675;. The algorithm that outputs</p><p>&#8984; n&#8677;d satisfies (", )-DP.</p><p>In this setting, with Z &#8672; N 0, 2 n&#8677;d following Theorem 3.1 (which ensures a fixed level of privacy when &#8675; = 1 for an arbitrary factorization factorization A = BC) the expected reconstruction error can be computed directly as</p><p>As has been noted <ref type="bibr">[1,</ref><ref type="bibr">27]</ref>, Eq. ( <ref type="formula">2</ref>) can be manipulated to yield a convex program, for which hand-tuned algorithms exist <ref type="bibr">[27,</ref><ref type="bibr">Section 4]</ref>. Theorem 2.1 shows, for the first time, that arbitrary factorizations found by minimizing this optimization problem can be applied in the adaptive streaming setting.</p><p>We present an alternative characterization of these optima, which reformulates the optimization problem as a fixed-point problem. We show that simply iterating an explicit mapping converges to this fixed point from an appropriate initialization, and observe numerically that the associated algorithm achieves fast, global convergence.</p><p>Since the Moore-Penrose pseudoinverse yields the minimal `2-norm solution to a set of underdetermined linear equations [38, Theorem 2.1.1], we note that for a fixed C term (of any dimensionality), the optimal B may be expressed as B ? C = AC &#8224; . Since A = BC implies A = &#8629;B 1 &#8629; C , for any linear space of matrices V, we may express the optimization problem of interest as</p><p>The properties of the problem Eq. ( <ref type="formula">3</ref>) have been studied previously. In particular, [27, Section 3] studied a symmetric version, transforming the problem as:</p><p>which essentially reparameterizes Eq. (3) (with</p><p>To recover a matrixmechanism factorization of A, then, one may utilize any C such that X ? = C &#8676; C, e.g. C = p X ? . Proposition 2.2 can be used to construct a lower-triangular factorization if desired.</p><p>Yuan et al. <ref type="bibr">[27]</ref> show: 1) Any solution X ? of Eq. ( <ref type="formula">4</ref>) must have diagonal entries exactly 1. 2) Any solution X ? may be taken to be strictly within the positive-definite cone, with minimal eigenvalue bounded from below in terms of the eigenvalues of A. 3) For any full-rank A, X 7 ! tr(A &#8676; AX 1 ) is strictly convex over symmetric, positive-definite matrices. Therefore the solution to Eq. ( <ref type="formula">4</ref>) is unique. By analyzing Eq. ( <ref type="formula">4</ref>) directly, we derive a characterization of solutions in terms of an explicit fixed-point problem, with a corresponding bound on the optimality gap.</p><p>Theorem 3.2. The minimizer X ? of Eq. ( <ref type="formula">4</ref>) is in one-to-one correspondence with the unique fixed point of the function : R n + ! R n + defined by</p><p>Letting</p><p>for the fixed point v ? of Eq. (5), that is (v ? ) = v ? , we have X ? = X (v ? ), and this pair (X ? , v ? ) satisfies</p><p>Further, for any v 2 R n + , the objective value of the primal problem Eq. ( <ref type="formula">4</ref>) is lower-bounded by</p><p>and this bound is tight for v = v ? .</p><p>The sum of the elements of represents a quantity of independent interest in quantum information, the so-called Jozsa fidelity <ref type="bibr">[39,</ref><ref type="bibr">40]</ref>, while X represents the matrix geometric mean of A &#8676; A and diag(v) 1 <ref type="bibr">[41,</ref><ref type="bibr">42]</ref>. These connections give some hope that the fixed point of can be understood in a direct manner. We can show local, though not yet global, convergence of the iterates of to this fixed point.</p><p>Theorem 3.3. defined in Eq. ( <ref type="formula">5</ref>) is a local contraction around its fixed point in a suitable metric, and hence there is a neighborhood of this fixed point in which iterates of converge to this fixed point. The precise norm of this contraction, and the size of the neighborhood in which convergence is guaranteed, can both be estimated in terms of minimum and maximum eigenvalues of A.</p><p>This result can be shown by linearizing the mapping around its fixed point and performing an involved estimate of its Jacobian at the fixed point. As such, it is implied by Theorem E.1, which states that the linearization of around its fixed point is a contraction in a suitable metric, and therefore the Banach fixed-point theorem applies.</p><p>Remark. Notably missing from quantification of the contraction is the dimension n. Indeed, the argument is dimension-independent in a strong sense: it applies to the suitably generalized definition of where A is any bounded linear operator on a Hilbert space with bounded inverse. </p><p>Empirical performance of the fixed-point method Experimentally, iterating the mapping is sufficient to converge to the global optimum extremely quickly from any initial point (modulo potential numerical issues in computing the matrix square root, discussed in Appendix E.4). Yuan et al. <ref type="bibr">[27,</ref> Algorithm 1] design an algorithm with globally linear and locally quadratic convergence rate, with similar asymptotics to iterating (each dominated by an n 3 term), though at the cost of introducing a parameter T . Iterating , on the other hand, is parameter-free. We implemented [27, Algorithm 1] as well as a direct gradient-descent-based method to numerically compare convergence speed. As a canonical benchmark, we computed optimal factorizations of the 512 &#8677; 512 and 2048 &#8677; 2048 prefixsum matrices S (Appendix G provides a visualization of this optimal factorization). Our fixed-point algorithm was significantly faster than either of the alternatives to compute optima, computing a lower-loss matrix for the larger problem in less than 3 minutes than either alternative found in over 80 minutes. See Appendix E.4 for details. Further, via Eq. ( <ref type="formula">8</ref>), our approach provides an optimality certificate that allows a precise specification of the stopping criteria in terms of any target optimality gap. The speed and simplicity of our fixed-point algorithm was a significant enabler of the mechanism exploration presented in the next section.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">The matrix mechanism for SGD</head><p>To define our gradient descent algorithm, let G 2 R n&#8677;d be the matrix of gradients, with row vector g i 2 R 1&#8677;d the gradient observed on iteration i after clipping to norm at most &#8675;; we abuse notation slightly by writing G [1:i,:] 2 R n&#8677;d , formed by taking the first i rows of G, with zeros for the as-of-yet unobserved gradient rows for iterations i + 1, . . . , n (the lower triangular structure of the matrices we consider will imply G [1:i,:] vs G does not in fact change the value computed). With this notation, we define Algorithm 1, a general template for private SGD algorithms. The power of this general formulation comes largely from the following privacy guarantee:</p><p>Theorem 4.1. Under the "replace with zero" notion of differential privacy (in Defininition J.1 in the appendix) over examples (records) i , taking &#285; = 0 when i = ?, Algorithm 1 (that releases the iterates &#10003; [i,:] ) satisfies equivalent (", )-DP to the Gaussian mechanism with noise variance 2 applied to records with `2 sensitivity at most &#8675; , where = max i C [:,i] 2 is the maximum column norm of C, and &#8675; is the clipping norm.</p><p>Theorem 4.1 shows that the contribution of C to the loss Eq. ( <ref type="formula">19</ref>) is reflected in the privacy guarantee of Algorithm 1, by determining the sensitivity of the matrix mechanism Eq. ( <ref type="formula">1</ref>). The contribution of B determines the expected squared reconstruction error of the matrix mechanism, by definition. This quantification can in turn be converted by existing analytical methods to a regret bound for convex losses:</p><p>Proposition 4.1 (Adaptation of Theorem C.1, Kairouz et al. <ref type="bibr">[6]</ref>). In the setup of Algorithm 1</p><p>We now consider different instantiations of Algorithm 1. Let S be the prefix-sum matrix as defined in Appendix A, and let C T be the matrix representation of the binary tree (Appendix C), so for appropriate choices of the reconstruction matrices B hs and B hf , S = B hs C T gives the Honaker Online mehcanism, and S = B hf C T gives the Honaker Full mechanism. In particular, using the Honaker Online factorization in Algorithm 1 recovers the non-momentum DP-FTRL algorithm of Kairouz et al. <ref type="bibr">[6]</ref>.</p><p>However, Kairouz et al. <ref type="bibr">[6]</ref> observed that for non-convex objectives, DP-FTRL with momentum provided superior privacy/accuracy tradeoffs. Given prefix sums, momentum can be implemented as post processing by estimating individual gradients/updates as the difference of successive cumulative sums (multiplication by S 1 ), and then passing these into a standard momentum SGD optimizer. We show that performance can be improved by directly incorporating momentum and a-priori learning rate schedules directly into the DP mechanism.</p><p>A basic but important observation is that momentum SGD can be expressed as a linear map of gradients G ! MG. We consider the classic momentum algorithm of Polyak <ref type="bibr">[43]</ref>, with per-iteration learning rates<ref type="foot">foot_2</ref> &#8984; 1 , . . . , &#8984; n and momentum 2 [0, 1), as in Algorithm 2. Alternatively, we can express momentum SGD as a linear operator on the gradients: Proposition 4.2. For any 2 [0, 1), n 1, per iteration learning rates &#8984; 1 , . . . , &#8984; n , define the lower-triangular matrix M 2 R n&#8677;n as the product of lower-triangular matrices M (&#8984;) and M ( ) :</p><p>Then, for any matrix of of per-iteration gradients G 2 R n&#8677;d with rows [g 1 , . . . , g n ], the sequence of iterates &#10003; 2 R n&#8677;d with rows [&#10003; 1 , . . . &#10003; n ] produced by Algorithm 2 can equivalently be written &#10003; = MG.</p><p>We apply the fixed-point algorithm of Section 3 to M to obtain optimal matrix mechanisms M = BC, which indeed leads to improved performance. <ref type="foot">4</ref> We can also convert mechanisms that produce DP prefix sums to produce momentum iterates via post processing: given any matrix mechanism for the prefix sum problem given as a factorization S = BC, we can convert this to a mechanism for momentum as M = BC where B = MS 1 B. Straightforward calculations show this representation is equivalent to the "Momentum Variant" of DP-FTRL <ref type="bibr">[6]</ref>. This allows us to consistently evaluate the mechanisms in terms of the total variance (squared error) induced in the outputs by unit-variance noise Z in the mechanism via Eq. ( <ref type="formula">2</ref>). Table <ref type="table">1</ref> summarizes the four instantiations of Algorithm 1 for any choise of M; note in particular that for = 0 and a fixed learning rate schedule &#8984; i = 1, M = S. Fig. <ref type="figure">1</ref> compares the per-step squared error of the DP momentum iterates for these methods for = 0 (prefix sums, as a constant &#8984; = 1 is used) and = 0.95.</p><p>Computational efficiency Some care is necessary for the efficient implementation of Algorithm 1, particularly the computation of M [i,:] G [1:i,j] + B [i,:] Z on line 11. First, we observe that via Proposition 4.2 we can efficiently compute the MG term via Algorithm 2, rather than as a matrix operation.  This leaves the computation of the noise B [i,:] Z. For applications to ML, d could be 10 6 10 9 , and with even n = 10 4 rounds (iterations) this might make the total calculation quite expensive if not prohibitive. With an efficient TensorFlow implementation, in our experiments with d &#8673; 4 &#8677; 10 6 and n = 2048, we found we could compute the noise directly. However, for larger applications we show (in Appendix H) that one can compute structured matrices that well-approximate the optimal B ? for the prefix sum matrix while allowing for O(d) calculation of the per-round noise vectors (on par with that of the binary tree mechanism, which can also provide computational efficiency with a careful implementation, see Table <ref type="table">2</ref>). The key is to observe the diagonal dominance of the optimal B ? (see Appendix G), leading to an approximation B that is the sum of a lower-triangular d-banded matrix with the remaining entries in the lower triangle extracted from a low-rank approximation computed via alternating-least-squares.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Experimental results</head><p>The results of Sections 2 and 4 significantly expand the space of mechanisms which can be used in training ML models with differential privacy in the single-pass setting. In this section we demonstrate that these techniques can in fact significantly advance the state-of-the-art in private ML.</p><p>User-level privacy for language models Private training is particularly important for generative language models: training language models on data from the right distribution is critical for utility (e.g., user input in a mobile keyboard <ref type="bibr">[44,</ref><ref type="bibr">45]</ref>), but this data is often privacy-sensitive. Further, language models have been shown to be capable of memorizing training data <ref type="bibr">[46]</ref><ref type="bibr">[47]</ref><ref type="bibr">[48]</ref>. In this setting it is important to consider user-level DP, where the neighbor relation of the DP guarantee covers all of the training examples (tokens) from any one user, as opposed to a single training example <ref type="bibr">[49]</ref>. In our setting, this corresponds to ensuring that each user's examples contribute to a bounded `2-norm update to a single row of X (Definition 3.1). This is accomplished by extending Algorithm 1 in the natural way to Federated Averaging <ref type="bibr">[50]</ref>: instead of a single gradient, we take g i to be the sum of the individually-clipped-to-&#8675; updates of all users (100 or 167 in our experiments) participating in the current round, with each user contributing to a single round over the course of training.</p><p>For these reasons, we focused on the StackOverflow next-word prediction problem, introduced in <ref type="bibr">[51]</ref> and publicly hosted in TensorFlow-Federated (TFF) <ref type="bibr">[52]</ref>. This task was explored extensively in <ref type="bibr">[6]</ref>, and serves as a major benchmark in federated learning, used in <ref type="bibr">[51,</ref><ref type="bibr">6,</ref><ref type="bibr">[53]</ref><ref type="bibr">[54]</ref><ref type="bibr">[55]</ref>, and others. The StackOverflow dataset contains sufficiently many clients to support single-pass algorithms with 100 clients per round, similar to the baseline setup of <ref type="bibr">[6]</ref>. For this reason, we are able to provide true (", ) privacy quantifications for the models we train. <ref type="foot">5</ref>Results We compare the four mechanisms of Table <ref type="table">1</ref> on this problem; full experimental methodology, as well as additional plots (e.g., for validation error vs. training rounds) are provided in Appendix I. Fig. <ref type="figure">2</ref> shows that even with constant learning rates, our matrix factorization approaches significantly outperform the previous state-of-the-art across a range of privacy "'s. Further, thanks to the results of Section 2, we are able to apply the Honaker Full mechanism for comparison. Fig. <ref type="figure">3</ref> shows that applying learning rate decay (dropping the learning rate by 0.15&#8677; for the last 512 rounds) and learning rate cooldown (linearly dropping the learning rate from 1.0&#8677; to 0.05&#8677; over the last 512 rounds) show added improvements. These experiments all used 100 clients/round as in <ref type="bibr">[6]</ref>, but the rightmost bars shows increasing this to 167 (the maximum possible for a single pass of 2048 rounds) provides additional accuracy. In combination, these techniques close more than 2/3rds of the gap between private and non-private training.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">Conclusions</head><p>We have shown the general applicability of the Gaussian matrix mechanism to the adaptive streaming setting, introduced a highly efficient mechanism of determining optimal (in the sense of total `2 2 error) matrix mechanisms, used this approach to directly incorporate momentum and learning rate schedules into the DP mechanism, and empirically demonstrated the resulting private SGD (or FedAvg in the federated setting) substantially improves on the state of the art for private ML.</p><p>While our focus has been on the application of these techniques to gradient-based optimization algorithms, we emphasize that the problem of producing private estimates for linear queries in the adaptive streaming setting is a fundamental DP primitive of much broader applicability, as noted in the introduction, and so our work immediately leads to improvements in those applications as well.</p><p>Finally, our work raises numerous natural follow-up questions which we hope will inspire subsequent work; we sketch these in Appendix B.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A Summary of notation and important matrices</head><p>The prefix-sum linear operator S, and its inverse:</p><p>Representation of momentum SGD as a linear operator M = M (&#8984;) M ( ) :</p><p>Summary of notation The following table briefly summarizes notation used throughout this work.</p><p>Input (e.g. gradient) on step i of the online process.</p><p>A 2 R n&#8677;n Lower-triangular linear query matrix to be factorized as A = BC.</p><p>min (A), max (A). Smallest and largest eigenvalues of real matrix A.</p><p>A &#8676; Conjugate transpose of A.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>X ?</head><p>A matrix X that is "optimal" in a context-dependent sense.</p><p>A &#8224; Moore-Penrose pseudoinverse of matrix A.</p><p>The (i, j) th entry of matrix A.</p><p>A [i,:] and A [:,j] The i th row and j th column.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B Future work.</head><p>Each of the sections above poses a unique set of problems for future investigation, many interrelated. We will highlight only some of the major questions left open by this work.</p><p>Scalable mechanism implementations Theorem 2.1 shows that we need not restrict ourselves to any particular matrix structure in order to guarantee privacy over adaptive streams. Appendix H shows we can find efficient approximations for the case of prefix sums, but this leaves open the question of whether better or more general approximations are possible, or whether one can optimize over structures that allow efficient implementations directly.</p><p>Analysis and numerics of Theorem 3.3 represents a usable convergence result for iterates of the mapping ; on the other hand, it represents only partial progress on the conjecture of global convergence of these iterates. Though we factorized many distinct matrices in the course of writing this paper, we generated no reason to doubt this conjecture. Indeed, the speed of convergence of these iterates of (see Appendix E.4) only makes this method more intriguing from a theoretical perspective. Further, though the fixed-point method utilized to compute these factorizations has enabled significant exploration (as detailed in Section 4), it still does not quite represent the optimal algorithm for computing these optima: an explicit formula for the fixed point of would clearly be desirable, and might yield interesting insights into the structure of these optimal matrices. We finally note that for production use, additional care will be needed to ensure that claimed privacy guarantees fully account for floating point imprecision.</p><p>Adaptive choice of the query While the sequence of gradients during optimization is adaptive (subsequent gradients depend on previous gradients), as we have seen SGD with momentum can be expressed as a fixed linear operator M. Data-independent learning rate schedules can be incorporated into an optimization matrix in a similar fashion, again allowing for optimal DP matrix mechanisms. However, adaptive learning rate schedules such as AdaGrad amount to a non-linear (and adaptive, not fixed) map on the gradient sequence; hence a very interesting open question is to see if the approach used here can be extended to adaptive optimization algorithms.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C Tree aggregation and decoding as matrix factorization</head><p>As mention in Section 1, the tree data structure T is linear in the data matrix G (all of its internal nodes are linear combinations of the rows G). Therefore the mapping G ! T can be represented as multiplication by a matrix. We present a simple recursive construction of this matrix. The base case is the 1 &#8677; 1 matrix <ref type="bibr">[1]</ref>, which we will denote by C </p><p>and so on. Each row of C</p><p>T G can be seen readily to correspond to a node of the binary tree T constructed from G, assuming n = 2 k 1 (possibly padding with zeros if needed).</p><p>With this construction, it is straightforward to represent both vanilla differentially-private binary tree aggregation and the Honaker variant as instantiations of the matrix factorization framework. For a vector x with n = 2 k 1 entries, vanilla binary-tree aggregation can be represented as C = C T . This estimator is precisely SC &#8224; . The streaming Honaker estimator-from-below represents the minimal loss factorization satisfying the property that the j th row of B zeros out rows in the matrix CG which place nonzero weight on the i th row of G for i &gt; j. The Honaker estimator-from-below can be expressed similarly row-by-row with a constrained pseudoinverse of C.</p><p>Proof. We begin by recalling a geometric property of the Moore-Penrose pseudoinverse. Theorem 2.1.1 of <ref type="bibr">[38]</ref> states that for any matrix C 2 C m&#8677;n , vector s 2 C m , the vector C &#8224; s is the minimal least-squares solution to the linear system Cx = s. Notice that this statement is implicitly a statement of uniqueness; C &#8224; s is the unique minimal-norm solution to Cx = s, assuming feasability of this equation. Since the square of the Frobenius norm of the matrix B is the sum of the squared norms of its rows, we may apply this Theorem row-by-row to B to demonstrate that the minimal Frobenius norm solution B to S = BC for fixed C is SC &#8224; . This minimal Frobenius norm property may be translated to a statistical perspective. That is, for a fixed matrix C and data matrix G, SC &#8224; represents the minimal-variance unbiased linear estimator for SG given the noisy estimates CG + Z. This is precisely the definition of Honaker's fully efficient estimator in Section 3.4 of <ref type="bibr">[22]</ref>, and we have the first statement of this proposition.</p><p>The second follows similarly, but leveraging instead the geometric properties of the constrained pseudoinverse. These properties are collected in Theorem 3.6.3 of <ref type="bibr">[38]</ref>, and allow us to compute directly the optimal B under constraints that certain entries in each row must be 0, corresponding to the constraints stated in the proposition. By construction of the matrices C (k) T , the property described in the statement of Proposition C.1 corresponds to restricting the linear estimator computed from a binary tree to depend only on the information below the nodes corresponding to the 1s in a binary expansion of the index of the partial sum under consideration. This is precisely the definition of the estimator from below in Section 3.2 of <ref type="bibr">[22]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D Proofs and missing details for Section 2</head><p>Proof of Proposition 2.1. The key idea is that the nonadaptive version of the definition implies a bound on the log-odds ratio that always holds (even after the fact).</p><p>For simplicity, we focus on the case where the universe of possible outputs a is discrete (to avoid measurability issues).</p><p>Fix an adversary A and mechanism M. Recall side is fixed an unknown to the adversary. When side = 0, the probability of a particular view (G, H, a) is the following. We write (G, H, a) hM, Ai 0 for the event with sequence of mechanism outputs a, when the mechanism and the adversary are operating with the variable side = 0, and the neighboring data streams are G and H (and analogously for side = 1).</p><p>these terms depend on side .</p><p>The probability of (G, H, a) when side = 1 is similar, except that the inputs to M are now h t 's instead of g t 's. Either way, we get a product of 2n terms, half of which are about the probability of A's outputs, and half of which are about M's outputs. They key fact here is that the terms describing A's output are the same in both expressions. When we take the ratio, therefore, those terms cancel out and we obtain:</p><p>This last expression involves no adversary-it is simply the ratio of the probabilities that the mechanism would have produced a given output sequence if the sequences G and H had been specified nonadaptively. Since G, H are always valid neighboring sequences, and since the nonadaptive mechanism's guarantee holds for all output sequences, the ratio above is bounded between e " and e " , as desired.</p><p>Proof of Theorem 2.1. The idea is to show that, when A is lower triangular, the mechanism M can be rewritten in such a way that the adaptive privacy of M can be deduced from the privacy guarantees of the usual Gaussian mechanism with adaptively selected queries.</p><p>Let (L, Q) form a lower-triangular LQ-factorization of B, meaning that L is lower triangular, Q is orthonormal, and B = LQ. By assumption, A is square and invertible, so L and Q are also square and invertible. Now consider the modified mechanism</p><p>where &#63743; is the same noise standard deviation as in the original mechanism. Since L and A are lower triangular, it also means that L 1 A = QC is also lower triangular. This means that QCG + Z can operate in the continuous release model, as row i of QCG depends only on the first i rows of G.</p><p>Next, we further show the mechanism QCG + Z (that is, M without the post-processing operation of multiplying with L) is an instance of the standard Gaussian mechanism for computing an adaptively defined function in the continuous release model with a guaranteed bound on the global `2 sensitivity. <ref type="foot">6</ref>Let G, H 2 N be any two fixed neighboring data streams with kC(G H)k F &#63743; &#63743;. Then because Q is orthonormal we have kQC(G H)k F &#63743; &#63743;. Letting g = flatten(QCG) 2 R nd and h = flatten(QCH) 2 R nd , we have kg hk 2 &#63743; &#63743;. Hence, QCG + Z is equivalent to an application of the standard Guassian mechanism on inputs QCG, and the result for adaptive streams follows from Claim D.1 below. This claim holds as the privacy loss random variable is stochastically dominated by an appropriate normally-distributed random variable (e.g., <ref type="bibr">[56]</ref>).</p><p>Claim D.1 (Folklore). Consider a streaming data vector g = [g 1 , . . . , g n ] 2 R n s.t. for any neighboring stream h we have the `2-sensitivity kg hk 2 &#63743; &#63743;. If g + N (0, &#63743; 2 2 ) n satisfy (", )-DP (or &#8674;-zCDP or &#181;-Gaussian DP) in the nonadaptive continual release model, then same mechanism satisfies the same privacy guarantee in the adaptive continuous release model.</p><p>As L is lower-triangular, the adaptive streaming DP guarantee of QCG+Z extends to the mechanism M by the post-processing property of DP.</p><p>Finally, we have</p><p>and so the only difference from M is the use of noise QZ vs Z. Since Q is orthonormal and the Gaussian distribution is rotationally invariant, QZ and Z are identically distributed, and hence M and M produce identical output distributions on any fixed data set G. Thus an adversary can simulate M given access to M. This in turn means that the privacy guarantee of the mechanism M transfers to the mechanism M. This completes the proof.</p><p>Proof of Proposition 2.2. The existence of such a lower-triangular factorization with identical induced matrix mechanism distribution follows directly from the proof of Theorem 2.1. The body of the proof leverages the distributional equivalence of all mechanisms expressible as</p><p>Since A is lower-triangular, letting U = R &#8676; recovers a lower-triangular mechanism (IE, both terms in the factorization are lower-triangular) which is distributionally equivalent to the factorization A = BC.</p><p>The claimed uniqueness follows from uniquness of the QR factorization with all-nonnegative diagonal entries; see, e.g., <ref type="bibr">[57,</ref><ref type="bibr">Theorem 2.1.14]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.1 Not all additive noise mechanisms are adaptively private</head><p>Consider the following two step sampling process<ref type="foot">foot_7</ref> : . Observe that, conditioned on A = a, we can write B as the sum of independent random variables B = B 1 + B 2 where B 1 &#8672; N (0, I aa t kak 2 )-a component orthogonal to a with variance 1 in all other directionsand B 2 &#8672; &#8984; a kak &#8226; N (0, 1)-a component parallel to a with much smaller variance &#8984; in that direction.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Return (A, B)</head><p>Now consider a mechanism M that takes a parameter and two inputs of the form (x 1 , x 2 ) 2 (R d ) 2  where x 1 = 0 (always) and x 2 has Euclidean norm at most 1, and returns (x 1 + A, x 2 + B). The mechanism can be run interactively, in which case x 2 could be selected based on A, which can be deduced from x 1 + A. The notion of neighboring here is trivial: every pair (0, x 2 ) is a neighbor of every other pair (0, y 2 ) so long as kx 2 k and ky 2 k are at most 1.</p><p>For simplicity, we formulate the mechanism for the special when n = 2 and the first input is forced to be 0, but similar constructions and reasoning apply for larger n and other types of inputs.</p><p>Proposition D.1. M is nonadaptively (", )-DP with parameters " = &#8677;( p ln(1/ )/ ) when d is sufficiently large and exp( cd) for an absolute constant c &gt; 0.</p><p>Proof. Let (0, x 2 ) and (0, y 2 ) be the inputs submitted by the adversary. Let W = hx 2 y 2 , A kAk i. Observe that hx 2 y 2 , Ai distributed as N (0, kx 2 y 2 k</p><p>2 ) (with variance at most 2) and that kAk </p><p>where &#8679; is the projector onto the subspace orthogonal to a.</p><p>We get the same distribution with side = 1, except that x 2 is replaced by y 2 . Conditioned on a, we have additive noise with a well-understood distribution in both cases. The likelihood ratio thus depends only on W and &#8679;(x 2 y 2 ).</p><p>The first component consists of adding noise with standard deviation &#8984; to an input with sensitivity</p><p>; the second consists of adding noise in with standard deviation (in all d 1 relevant dimensions) to an input with sensitivity at most 2. Each of these satisfy (", )-differential privacy for " = &#8677;( p ln(1/ )/ ), as desired.</p><p>Proposition D.2. When &#8984; &lt; 1/3, the mechanism M is not adaptively (", 1 4 )-DP unless "</p><p>Proof. An adaptive adversary first submits vectors x 1 , y 1 (both 0), receives a first output a which is either x 1 + A or y 1 + A, and then submits x 2 and y 2 and receives a second output b which is either x 2 + B or y 2 + B. Consider the specific adversary submits x 2 = a kak and y 2 = x 2 (based on the first output a) and then receives output b.</p><p>The idea is that the variance of B in the direction of x 2 = a is only &#8984; (instead of ) and soinformally-the effective " of the mechanism is roughly 1/(&#8984; ) instead of 1/ . When d is large, &#8984; is much smaller than 1 and so the mechanism provides much weaker privacy guarantees in the adaptive setting.</p><p>More formally, consider the random variable ha, bi. The component of B in the direction of a can be written B 2 = &#8984; a kak &#8226; Z for Z &#8672; N (0, 1). When side = 0, we thus have</p><p>Similarly, when side = 1, the inner product ha, bi is distributed as kak ( 1 + &#8984;Z). The probability that ha, bi &gt; 0 is at least 1 2 when side = 1 and, for &#8984; &lt; 1, the same probability is at most exp</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>&#8984;</head><p>when side = 0. In particular, the mechanism is not (", )-DP in the adaptive model unless 1  2 &#63743; e " Pr(ha, bi &gt; 0|side = 0)</p><p>; that is, it requires "</p><p>). The bound is at least 1 3( &#8984;) 2 for &#63743; 1/4 and &#8984; &lt; 1/3.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E Proofs and observations for Section 3</head><p>E.1 Proof of Theorem 3.1</p><p>Proof. The proof essentially follows from standard arguments about the DP guarantee for the Gaussian mechanism <ref type="bibr">[32,</ref><ref type="bibr">35]</ref>. In the following, we provide some of the details for completeness.</p><p>First, notice that it is sufficient to state that the computation CG + Z satisfies (", )-DP, due to the post processing property of DP. Now consider two data sets G and H differing in one data record (as per the neighborhood definition in J.1). We have C(G H) is to the outer product cg, where g is the row of G that was changed, and c is the corresponding column of C. By assumption in the theorem statement, we have</p><p>With the bound on the sensitivity above, if each entry of Z is drawn i.i.d. from N (0, 2 ), then <ref type="bibr">[33]</ref>. We set the noise standard deviation by the use of Remark 15 in Steinke <ref type="bibr">[58]</ref>. Correspondingly, we have (", )-DP <ref type="bibr">[59]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.2 Proof of Theorem 3.2</head><p>Proof. For simplicity we consider the equality-constrained version of Eq. ( <ref type="formula">4</ref>) (permissible by <ref type="bibr">[27]</ref>):</p><p>We begin by noting that Slater's condition (see [60, Section 5.2.3]) holds in our setting, since the minimum eigenvalue of a matrix is a concave function (expressible as a minimum of linear functions), and we know from <ref type="bibr">[27]</ref> that that the optimum is strictly positive definite. Therefore strong duality holds, and complementary slackness implies we may drop the positive-definiteness constraint when we move to the Lagrange formulation. Thus, we introduce a Lagrange multiplier v for Eq. ( <ref type="formula">13</ref>), defining,</p><p>Differentiating Eq. ( <ref type="formula">14</ref>) with respect to X, we find</p><p>Let X ? be the optimizer of the primal problem Eq. ( <ref type="formula">13</ref>); then, by the Lagrange multiplier theorem (see, e.g., Proposition 4.1.1 of <ref type="bibr">[61]</ref>), there exists a unique v ? satisfying</p><p>which is an equivalent form of Eq. ( <ref type="formula">7</ref>). Since A is full-rank, and X ? is known from <ref type="bibr">[27]</ref> to be positive-definite, Eq. ( <ref type="formula">16</ref>) implies that diag (v) is invertible (indeed, positive definite).</p><p>Solving Eq. ( <ref type="formula">16</ref>) for X corresponds to solving for a generalized matrix square root. The equation Eq. ( <ref type="formula">16</ref>) may be uniquely solved, yielding</p><p>Clearly the X (v ? ) defined by Eq. ( <ref type="formula">6</ref>) represents a solution for Eq. ( <ref type="formula">16</ref>); that X (v ? ) = X ? can be seen by substituting Eq. ( <ref type="formula">16</ref>) for diag(v ? ) in Eq. ( <ref type="formula">6</ref>), and evaluating the result to the form X ? .</p><p>Since X ? has constant 1s on the diagonal (by the formulation Eq. ( <ref type="formula">13</ref>)), the expression Eq. ( <ref type="formula">6</ref>) implies that</p><p>and that therefore v ? is a fixed point of the mapping defined by Eq. ( <ref type="formula">5</ref>).</p><p>We have shown that an optimizer X ? corresponds to a fixed point v ? of . If we begin with a fixed point v ? of , and define X (v ? ) via Eq. ( <ref type="formula">6</ref>), the preceding calculations show that X (v ? ) is both feasible and a stationary point of the Lagrangian. The strict convexity of the problem, along with its smoothness, imply that the Hessian of the Lagrangian is positive definite at this stationary point, and therefore (e.g. by Proposition 4.2.1 of <ref type="bibr">[61]</ref>), this X (v ? ) is a local minimizer. Strict convexity implies that this minimizer is in fact the global minimizer.</p><p>The final claim of Eq. ( <ref type="formula">8</ref>) follows immediately from weak duality and the fact that</p><p>since the problem on the left is convex in X, and hence Eq. ( <ref type="formula">6</ref>) gives an optimality condition. Eq. ( <ref type="formula">8</ref>) follows by using A &#8676; AX 1 = X diag (v ? ) in the first trace in Eq. ( <ref type="formula">14</ref>), and then simplifying using properties of the matrix trace.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.3 Proof of local-contractive property of .</head><p>Recall that we study the map, defined in Eq. ( <ref type="formula">5</ref>),</p><p>from the positive cone in R n to itself. By Theorem 3.2, we know that it has a unique fixed point, which we denote by v ? . We will need some notation:</p><p>&#8226; In R n , we consider two inner products</p><p>The fist one is Euclidean, the second one is weighted with the weight given by v ? itself. The corresponding norms are kxk and kxk 1 .</p><p>&#8226; The operator norms of linear map A acting in R n will be denoted kAk, kAk 1 depending on the considered inner products, e.g.,</p><p>We start by giving a simple estimate on v ? . Proposition E.1. Suppose Q satisfies</p><p>with some constants &#63743; 1 and &#63743; 2 . Then,</p><p>Proof. Given any two non-negative matrices A and B that satisfy A &#63743; B, we clearly have</p><p>Then,</p><p>) . Thus, we apply (18) by first taking the square roots and then the diagonal parts of both sides to get</p><p>after we recall that v ? is the fixed point of (v). The required statement is now immediate.</p><p>Remark. The argument in the proof shows that maps the convex set {v : &#8629; &#63743; diag v &#63743; } into itself provided that 0 &lt; &#8629; &#63743; C 1 and C 2 &#63743; . Since is continuous, the Brouwer fixed point theorem gives yet another proof that a fixed point of exists.</p><p>The map v 7 ! (v) is smooth on R n . Its derivative at point v ? is therefore a linear map in R n . We will denote</p><p>Our central result is precisely the statement that the (weighted) norm of L is smaller than 1, and hence is a local contraction around v ? : Theorem E.1. The map L is a contraction in weighted norm, i.e.,</p><p>Remark. This immediately implies that the sequence {v n } given by v n+1 = (v n ) converges exponentially fast to v ? when v 0 is chosen sufficiently close to v ? . The exact parameters here depend only on &#63743; 1 and &#63743; 2 . The size of the neighborhood in which the first-order approximation implies that itself is a contraction similarly depends on &#63743; 1 , as this controls the smoothness of .</p><p>We will recall some facts before giving the proof of this theorem. Proposition E.2. If A is n &#8677; n matrix and d 2 R n , then</p><p>where the constants in O depend on kAk only.</p><p>Proof. That is an immediate calculation.</p><p>Proof. That follows from the Spectral Theorem for symmetric matrices and the trigonometric integral formula p = &#8673;</p><p>which follows by substituting t = tan 2 &#10003;. Proposition E.4. If A, V are n &#8677; n matrices and both A and A + V are non-degenerate, then</p><p>Proof.</p><p>To check the first identity, it is enough to multiply it from the left by A + V and from the right by A. The second identity will follows by iterating the first identity once.</p><p>The formula for L is given in the following lemma.</p><p>Lemma E.1.</p><p>Proof. This result is based on a long but straightforward calculation. First, introduce d 2 R n by</p><p>Hence, denoting := diag d for shorthand, one has</p><p>since T &gt; 0 and the matrix square-root is Lipschitz-continuous at every point which represents a positive matrix. If one denotes X := p T 2 + 0.5 T 2 + 0.5T 2 , then Propositions E.2 and E.3 yield X (T + 0.5 T + 0.5 T) =</p><p>If we recall that v ? = (v ? ) = diagpart then</p><p>Now, notice that</p><p>where w := v v ? . Finally, we have</p><p>and that proves the required statement.</p><p>Our next step is to obtain the matrix representation of L in the standard basis of R n . Lemma E.2.</p><p>, i,j 2 {1, . . . , n} .</p><p>Proof. That calculation is straightforward after we use symmetry of matrices T and C.</p><p>The Theorem E.1 will be proved if Lemma E.3 is shown. In its proof, the following property of the Schur (elementwise, also known as Hadamard) product of two matrices is used. Proposition E.5. Suppose A and B are non-negative matrices of size n &#8677; n. Then, min (A B) min (A) min (B) .</p><p>Proof. Indeed, the matrix A B represents the principal submatrix of the Kronecker (or tensor) product A &#8998; B. Since min (A &#8998; B) = min (A) min (B), we get our result.</p><p>Lemma E.3. The operator L is selfadjoint with respect to the weighted inner product and kLk 1 &#63743; C(&#63743; 1 , &#63743; 2 ) &lt; 1.</p><p>Proof. First, we can write a bilinear form hLv, wi 1 = hv, wi</p><p>where G := C C, the Schur product, is a symmetric matrix. Hence, hLv, wi 1 = hLw, vi 1 and therefore L is appropriately selfadjoint. Next, we will prove a bound</p><p>with some positive C and C 5 2 (0, 1). That estimate for quadratic form is sufficient to prove that 1 &lt; 1 due to the variational characterization of the norm of a self-adjoint operator, i.e.,</p><p>in a sense of positive matrices. Indeed, min (G(t)) ( min (C(t))) 2 as follows from the properties of the Schur product. Since C(t) = T/(T 2 + t), we get</p><p>where C 3 depends on parameters &#63743; 1 and &#63743; 2 from (17) only. So, our claim (26) is proved. Given <ref type="bibr">(26)</ref>, we can write</p><p>thanks to Proposition E.1. This shows the left bound in Eq. <ref type="bibr">(25)</ref>.</p><p>The inequality 1</p><p>if we make the change of variables x j := v j / p v &#8676; j , j 2 {1, . . . , n}. It will be convenient to introduce a symmetric matrix D with coefficients given by</p><p>To bound the norm of this matrix, we will start with the following observation. The application of Spectral Theorem to matrix T yields</p><p>where</p><p>Recall also that v ? = diagpart T and therefore</p><p>Since the matrix elements of C(t) = (T 2 + t) 1 T are given by C [i,j] (t), the diagonal elements of (T 2 + t) 2 T 2 can be obtained by the formula</p><p>for i 2 {1, . . . , n}. Therefore, we get an identity</p><p>which can be rewritten as </p><p>The application of Schur's test for the norm of matrix gives kDk &#63743; C 5 &lt; 1. Since D is symmetric, this bound implies <ref type="bibr">(27)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.4 Numerical observations of the map .</head><p>Some care must be taken with floating point issues in the implementation of the map . In particular, numerical evaluation of depends critically on the computation of a matrix square root, and precision in this computation is crucial for the usability of these fixed-point methods.</p><p>Several numerical approaches can improve the stability of these algorithms. In particular, some of the expressions above (e.g., the definition of X ) imply a priori lower bounds on the eigenvalues of matrices for which we need square roots. The results of <ref type="bibr">[62]</ref> yield straightforward lower bounds that can stabilize our iterative algorithms. These bounds can be applied to ensure the iterates never encounter pathological numerical artifacts. As the size of matrices scales up (in particular, our factorizations usually focused on 2048 &#8677; 2048 matrices, and larger matrices are of interest), we observed that performing all computations in float64 precision was crucial to minimizing these numerical artifacts.</p><p>We observed experimentally that while factorizing some matrices, though the fixed-point method itself converged independently of the matrix factorized, some oscillation in the values of the loss Eq. ( <ref type="formula">2</ref>) occurred. Further investigation is needed to determine whether this oscillation represents a true feature of the iterated dynamics, or simply another numerical artifact, due e.g. to lack of precision in the matrix square root. If the former, certain approaches to prove global convergence of these iterates are ruled out: in particular, those which rely on this loss as a potential function, which iterating always decreases.</p><p>To evaluate empirical usefulness of this fixed-point method, we implemented three different algorithms for computing optimal factorizations:  <ref type="bibr">[27]</ref>. The methods were initialized identically, leveraging the expression Eq. ( <ref type="formula">6</ref>), a significantly better initialization for the gradient-based methods than might be obvious in the absence of this expression (e.g., initialization to I).</p><p>1. A gradient-descent-based procedure to compute the optima of Eq. ( <ref type="formula">4</ref>), guaranteed to be convergent by the convexity of the problem. 2. [27, Algorithm 1], a Newton-direction-based algorithm with global convergence guarantees, hand-optimized with the structure of the problem-in particular, avoiding the need to materialize a Hessian with n 4 elements. This implementation used the default settings from <ref type="bibr">[27]</ref>. 3. Simply iterating the mapping .</p><p>In all situations we tested, the fixed-point method was significantly faster than either of the other two, up to two orders of magnitude in some cases. In Fig. <ref type="figure">4</ref>, we plot loss against time for an example of 2048 &#8677; 2048 matrix factorization using CPUs. The methods are all similarly amenable to GPU acceleration. Z. We note the well-known equivalence of FTRL and gradient descent, with requilarization parameter equivalent to 1 &#8984; (as can be seen by solving for the FTRL update). Following the standard linearization method of online convex optimization, we see:</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F Proofs for</head><p>Similarly to Kairouz et al. <ref type="bibr">[6]</ref>, the term A may be handled with standard online convex optimization techniques, yielding</p><p>so we are left to evaluate the expectation of B over the noise injected by Algorithm 1. We compute:</p><p>Jensen again</p><p>Putting together the estimates of A and B yields the result. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>G Visualization of Optimal Factorizations</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>H Computational efficiency for the matrix mechanism</head><p>Our primary goal has been to develop mechanisms with best-possible privacy vs utility tradeoffs in the streaming setting. However, the (B, C) we compute are in general dense, and do not obviously admit a computationally-efficient implementation of the associated DP mechanism. In contrast, tree aggregation (including, with a careful implementation, the streaming Honaker estimator) allows for k in 0, . . . , min(i, h 1) do # Handle h diagonals directly; No-op if h = 0 </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I Experiment Details</head><p>Mechanism implementation Though Appendix H shows that time-and space-bounded approximations to our optimal factorizations are possible, for our experimental results we followed Algorithm 1 and implemented the straightforward version of our mechanism. That is, we leverage the expression B (CG + Z) = AG + BZ, for A = BC, where A represents the linear operator we are interested in estimating. By introducing a seed to the generation of the noise vector Z, the appropriate noise vector (BZ) [i,:] can simply be computed afresh for each iteration of training (or round in the federated setting). The linear operators A in which we are interested admit efficient implementations; e.g., gradient descent with momentum can be implemented with a single buffer, representing the current state of the model. The computation of BZ is therefore the dominant component in the above.</p><p>We normalized all of our factorizations to have sensitivity exactly 1 in the single-pass setting.</p><p>Integration with federated learning We implemented these mechanisms via the DPQuery interface in TensorFlow-Privacy <ref type="bibr">[66]</ref>, which integrates naturally with tff.aggregators, the aggregators library of TensorFlow-Federated. We were therefore able to reuse precisely the same code for training as <ref type="bibr">[67]</ref>, simply swapping in our matrix-factorization-based aggregators as an argument to TFF's tff.learning.build_federated_averaging_process function. In conjunction with this paper, we are in the process of open-sourcing the code to reproduce our experiments. TFF's distributed C++ runtime, equipped with one machine for every 10 clients per round and low-priority CPU resources, enabled our experiment grids (including evaluation) to finish in approximately 1 day.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Stackoverflow settings</head><p>The preprocessing of our data, in addition to model architecture as well as the settings of various task-specific hyperparameters like the maximum number of examples processed per-client, we share with <ref type="bibr">[6]</ref>.</p><p>Test accuracy details Test accuracies (excluding predictions on out-of-vocabulary and end-ofsentence tokens) plotted against " values associated to = 10 6 for various instantiations of the mechanisms we tested can be found in Fig. <ref type="figure">2</ref>. This figure was generated with a sweep over client and server learning rates, with grids chosen via in the heatmap for FedAvgM in Figure <ref type="figure">2</ref> of <ref type="bibr">[51]</ref>, as well as a sweep over server momentum values. The noise multiplier settings were chosen with a simple (0.25, 1., 0.9) 1.7 (0.25, 0.5, 0.9) 0.8 (0.5, 0.5, 0.0)</p><p>18.9 (1., 1., 0.9) 8.2 (0.25, 1., 0.95) 3.7 (0.25, 0.5, 0.9) 1.7 (0.25, 0.5, 0.9) 0.8 (0.5, 0.5, 0.0) For Fig. <ref type="figure">3</ref>, the parameter settings differed based on the mechanisms explored. Constant LR schedules used the same settings as " = 18.9 in Table <ref type="table">4</ref>. For the exploration of learning rate decay schedules, a server learning rate of 0.5, client learning rate of 1.0, and server momentum of 0.95 were shared. The plot Fig. <ref type="figure">6</ref> was generated from the same set of experiments.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>J Background on Differential Privacy</head><p>In this paper we operate with the "replace with zero" variant of differential privacy [6, Defn. 2.1], sated below for completeness purposes. where the probability is over the randomness of A.</p><p>In our algorithms, we would treat ? specially, and assume it corresponds to the all-zeros vector of appropriate dimensions. This definition extends naturally to other variants like Renyi differential privacy (RDP) <ref type="bibr">[35]</ref>, and zero Concentrated Differential Privacy (zCDP). For completeness purposes we provide the definition of zCDP we primarily use in the paper.</p><p>Definition J.2 (zero concentrated differential privacy). Analogous to the definitiion of (", )differential privacy in Definition J.1, a randomized algorithm A is &#8674;-zCDP if the condition on</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>SGD with constant learning rate &#8984; serves as an intuitive illustration: performing SGD on parameters &#10003; starting from 0, the t-th iterate is simply &#10003;t = &#8984; P t i=1 gi, where gi is the gradient computed on step i. That is, the learned model parameters &#10003;t are exactly a scaled version of the cumulative sum of gradients so far. It is the total error in these cumulative sums that matters most, not the error in the private estimates of each individual gi. See Theorem 5.1 of<ref type="bibr">[6]</ref> for a formal statement.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1"><p>Fichtenberger et al. [30]  strive to a get an analytical optimal leading multiplicative constant for the additive error achievable for the problem of continual observation under DP. We on the other hand focus on computationally estimating the optimal matrix factorization mechanism for the problem under DP. We leave the empirical comparison to the explicit construction in Fichtenberger et al. for future work.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_2"><p>The schedule may be arbitrary, but must be chosen a priori in a data-independent way.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_3"><p>The definition M = M (&#8984;) M ( ) is for the convenience, and is unrelated to the optimal factorization.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="5" xml:id="foot_4"><p>With 342,477 users this dataset is still small compared to many real-world applications (e.g., Gboard has 5 billion downloads). The extrapolations verified by[49,  </p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_5"><p>6] suggest the accuracy results of Fig.3would hold with (" = 1.36, = 10 7 )-DP if the population and cohort size (clients per round) were both scaled by 10&#8677;.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="6" xml:id="foot_6"><p>Observe the same claim cannot be made for M, e.g., as CG + Z cannot be used in the continuous release setting as in general C induces a dependence on not-yet-seen data.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="7" xml:id="foot_7"><p>For the clarity of noation, in this section we will refer to random variables with uppercase, and their corresponding instantiations with lower case. Additionally, all norms are k&#8226;k 2 .</p></note>
		</body>
		</text>
</TEI>
