{"title": "Learning to be Bayesian without Supervision", "book": "Advances in Neural Information Processing Systems", "page_first": 1145, "page_last": 1152, "abstract": null, "full_text": "Learning to be Bayesian without Supervision\n\nMartin Raphan Courant Inst. of Mathematical Sciences New York University raphan@cims.nyu.edu\n\nEero P. Simoncelli Center for Neural Science, and Courant Inst. of Mathematical Sciences New York University eero.simoncelli@nyu.edu\n\nBayesian estimators are defined in terms of the posterior distribution. Typically, this is written as the product of the likelihood function and a prior probability density, both of which are assumed to be known. But in many situations, the prior density is not known, and is difficult to learn from data since one does not have access to uncorrupted samples of the variable being estimated. We show that for a wide variety of observation models, the Bayes least squares (BLS) estimator may be formulated without explicit reference to the prior. Specifically, we derive a direct expression for the estimator, and a related expression for the mean squared estimation error, both in terms of the density of the observed measurements. Each of these prior-free formulations allows us to approximate the estimator given a sufficient amount of observed data. We use the first form to develop practical nonparametric approximations of BLS estimators for several different observation processes, and the second form to develop a parametric family of estimators for use in the additive Gaussian noise case. We examine the empirical performance of these estimators as a function of the amount of observed data.\n\n1\n\nIntroduction\n\nBayesian methods are widely used throughout engineering for estimating quantities from corrupted measurements. Those that minimize the mean squared error (known as Bayes least squares, or BLS) are particularly widespread. These estimators are usually derived assuming explicit knowledge of the observation process (expressed as the conditional density of the observation given the quantity to be estimated), and the prior density over that quantity. Despite its appeal, this approach is often criticized for the reliance on knowledge of the prior distribution, since the true prior is usually not known, and in many cases one does not have data drawn from this distribution with which to approximate it. In this case, it must be learned from the same observed measurements that are available in the estimation problem. In general, learning the prior distribution from the observed data presents a difficult, if not impossible task, even when the observation process is known. In the commonly used \"empirical Bayesian\" approach [1], one assumes a parametric family of densities, whose parameters are obtained by fitting the data. This prior is then used to derive an estimator that may be applied to the data. If the true prior is not a member of the assumed parametric family, however, such estimators can perform quite poorly. An estimator may also be obtained in a supervised setting, in which one is provided with many pairs containing a corrupted observation along with the true value of the quantity to be estimated. In this case, selecting an estimator is a classic regression problem: find a function that best maps the observations to the correct values, in a least squares sense. Given a large enough number of training samples, this function will approach the BLS estimate, and should perform well on new samples drawn from the same distribution as the training samples. In many real-world situations, however, one does not have access to such training data. In this paper, we examine the BLS estimation problem in a setting that lies between the two cases described above. Specifically, we assume the observation process (but not the prior) is known, and\n\n\f\nwe assume unsupervised training data, consisting only of corrupted observations (without the correct values). We show that for many observation processes, the BLS estimator may be written directly in terms of the observation density. We also show a dual formulation, in which the BLS estimator may be obtained by minimizing an expression for the mean squared error that is written only in terms of the observation density. A few special cases of the first formulation appear in the empirical Bayes literature [2], and of the second formulation in another branch of the statistical literature concerned with improvement of estimators [3, 4, 5]. Our work serves to unify these prior-free methods within a linear algebraic framework, and to generalize them to a wider range of cases. We develop practical nonparametric approximations of estimators for several different observation processes, demonstrating empirically that they converge to the BLS estimator as the amount of observed data increases. We also develop a parametric family of estimators for use in the additive Gaussian case, and examine their empirical convergence properties. We expect such BLS estimators, constructed from corrupted observations without explicit knowledge of, assumptions about, or samples from the prior, to prove useful in a variety real-world estimation problems faced by machine or biological systems that must learn from examples.\n\n2\n\nBayes least squares estimation\n\nSuppose we make an observation, Y , that depends on a hidden variable X , where X and Y may be scalars or vectors. Given this observation, the BLS estimate of X is simply the conditional expectation of the posterior density, E {X |Y = y}. If the prior distribution on X is PX , and the likelihood function is PY |X then this can be written using Bayes' rule as x E {X |Y = y} = PX |Y (x|y) dx x P (1) = PY |X (y|x) PX (x) dx Y (y) , where the denominator is the distribution of the observed data: P PY (y) = Y |X (y|x) PX (x) dx . If we know PX and PY |X , we can calculate this explicitly. Alternatively, if we do not know PX or PY |X , but are given independent identically distributed (i.i.d.) samples (Xn , Yn ) drawn from the joint distribution of (X, Y ), then we can solve for the estimator f (y) = E {X |Y = y} nonparametrically, or we could choose a parametric family of estimators {f }, and choose to minimize the empirical squared error:\nN 1n ^ = arg min |f (Yn ) - Xn |2 . N =1\n\n(2)\n\nHowever, in many situations, one does not have access to PX , or to samples drawn from PX . 2.1 Prior-free reformulation of the BLS estimator\n\nIn many cases, the BLS estimate may be written without explicit reference to the prior distribution. We begin by noting that in Eq. (1), the prior appears only in the numerator P N (y) = Y |X (y|x) x PX (x) dx. This equation may be viewed as a composition of linear transformations of the function PX (x) N (y) = (A X){PX }(y), where X{f }(x) = xf (x), and the operator A computes an inner product with the likelihood function P A{f }(y) = Y |X (y|x) f (x) dx.\n\n\f\nSimilarly, Eq. (2) may be viewed as the linear transformation A applied to PX (x). If the linear transformation A is 1-1, and we restrict PY to lie in the range of A, then we can then write the numerator as a linear transformation on PY alone, without explicit reference to PX : N (y) = (A X A-1 ){PY }(y) = L{PY }(y). (3)\n\nIn the discrete case, PY (y) and N (y) are each vectors, A is a matrix containing PY |X , X is a diagonal matrix containing values of x, and is matrix multiplication. This allows us to write the BLS estimator as E {X |Y = y} = L{PY }(y) . PY (y) (4)\n\nNote that if we wished to calculate E {X n |Y }, then Eq. (3) would be replaced by (A Xn A-1 ){PY } = (A X A-1 )n {PY } = Ln {PY } . By linearity of the conditional expectation, we may extend this to any polynomial function (and thus to any function that can be approximated with a polynomial): M =M k k k=-N ck L {PY }(y) . E ck X k |Y = y PY (y)\n= -N\n\nIn the definition of the operator L, A-1 effectively inverts the observation process, recovering PX from PY . In many situations, this operation will not be well-behaved. For example, in the case of additive Gaussian noise, A-1 is a deconvolution operation which is inherently unstable for high frequencies. The usefulness of Eq. (4) comes from the fact that in many cases, the composite operation L may be written explicitly, even when the inverse operation is poorly defined or unstable. In section 3, we develop examples of operators L for a variety of observation processes. 2.2 Prior-free reformulation of the mean squared error\n\nIn some cases, developing a stable nonparametric approximation of the ratio in Eq. (4) may be difficult. However, the linear operator formulation of the BLS estimator also leads to a dual expression for the mean squared error that does not depend explicitly on the prior, and this may be used to select an optimal estimator from a parametric family of estimators. Specifically, for any estimator f (Y ) parameterized by , the mean squared error may be decomposed into two orthogonal terms: = | + | . | 2 2 2 E f (Y ) - E (X |Y )| E E (X |Y ) - X | E f (Y ) - X | The second term is the minimum possible MSE, obtained when using the optimal estimator. Since it does not depend on f , it is irrelevant for optimizing . The first term may be expanded as = | . | + | 2 2 2 E f (Y )| - 2f (Y )E (X |Y ) E f (Y ) - E (X |Y )| E E (X |Y )| Again, the second expectation does not depend on f . Using the prior-free formulation of the previous section, the second component of the first expectation may be written as f = L{PY }(Y ) E {f (Y )E (X |Y )} = E (Y ) PY (Y ) f L{PY }(y) PY (y)dy (y) PY (y) f = (y) L{PY }(y)dy L {f }(y)PY (y)dy = = E {L {f }(Y )} ,\n\n\f\nwhere L is the dual operator of L (in the discrete case, L is the matrix transpose of L). Combining all of the above, we have: | | . = 2 2 arg min E f (Y ) - X | (5) arg min E f (Y )| - 2L {f }(Y )\n \n\nwhere the expectation on the right is over the observation variable, Y . In practice, we can solve for an optimal by minimizing the sample mean of this quantity: N | . 1n 2 ^ f (Yn )| - 2L {f }(Yn ) (6) = arg min N =1 where {Yn } is a set of observed data. Again this does not require any knowledge of, or samples drawn from, the prior PX .\n\n3\n\nExample estimators\n\nIn general, it can be difficult to obtain the operator L directly from the definition in Eq. (3), because inversion of the operator A could be unstable or undefined. Instead, a solution may often be obtained by noting that the definition implies that L A = A X, or, equivalently L{PY |X (y|x)} = xPY |X (y|x). This is an eigenfunction equation: for each value of x, the conditional density PY |X (y|x) must be an eigenfunction (eigenvector, for discrete variables) of eoperator L, with associated eigenvalue x. Consider a standard example, in which the variable of interest is corrupted by independent additive noise: Y = X + W . The conditional density is PY |X (y|x) = PW (y - x). We wish to find an operator which when applied to this conditional density (viewed as a function of y) will give (7) L{PW (y - x)} = x PW (y - x) for all x. Subtracting y PW (y - x) from both sides gives (8) M {PW (y - x)} = -(y - x) PW (y - x). where M {f } (y) = L{f }(y) - y f (y) is a linear shift-invariant operator (acting in y). Taking Fourier transforms and using the convolution and differentiation properties gives: M( )PW ( ) = -(yPW )( ) = -i PW ( ), so that P M( ) = -i W ( ) PW ( ) P . = -i ln W ( ) L{f }(y) = y f (y) - F -1 i P f ( ln W ( ) ( ) y), (9)\n\n(10)\n\nThis gives us the linear operator\n\n(11)\n\nwhere F -1 denotes the inverse Fourier transform. Note that throughout this discussion X and W played symmetric roles. Thus, in cases with known prior density and unknown additive noise density, one can formulate the estimator entirely in terms of the prior. Our prior-free estimator methodology is quite general, and can often be applied to more complicated observation processes. In order to give some sense of the diversity of forms that can arise, Table 1 provides additional examples. References for the specific cases that we have found in the statistics literature are provided in table.\n\n\f\nObs. process Discrete A Gen. add. dd. [6]/[4]* Gaussian\n\nObs. density: PY |X (y|x) A PW (y - x)\ne x p{\n-1 T -1 (y-x-) 2 (y-x-) \n\nNumerator: N (y) = L{PY }(y) (A X A-1 )PY (y) P P i yPY - F -1 ln W ( ) Y ( ) } (y - )PY (y) + y PY (y) y PY (y ) - sPY (y - s) y PY (y ) + 22 {PW y PY (y ) - { 21 y s PY }(y ) PY }(y )\n\n\n\n| 2 |\n\nAdd. Poisson Add. Laplacian Add. Cauchy Add. uniform\n\nk e-\n\nk! (y - x - k s) 1 -|(y -x)/| 2 e 1 ( ((y -x))2 +1 )\n\n0,\n\n2a ,\n\n1\n\n|y - x| a |y - x| > a\n\ny PY (y ) + a gn(k )PY (y - ak ) P 1 ~ ~~ -2 Y (y )sgn(y - y )dy y PY (y ) - {(y Pc ) PY }(y )\ng (n) g (n+1) PY g (n) g (n-1) PY\n\nAdd. random # of components Disc. exp. [2]/[5]* Disc. inv. exp. [5]* Cnt. exp. [2]/[3]* Cnt. inv. exp. [3]* Poisson [7]/[5]* Gauss. scale mixture Lapl. scale mixture\n\nPW (y - x), where: K W k = 0 Wk , Wk i.i.d. (Pc ), K Poiss() h(x)g (n)xn h(x)g (n)x-n h(x)g (y )eT (y)x h(x)g (y )eT (y)/x\nxn e-x n! 1 e 2 x\n2 - yx 2\n\n(n + 1) (n - 1)\n\ng (y ) d P Y (y ) T ( y ) dy { g ( y ) }\n\ng (y )\n\ny T (y ) ~ ~P - g ( y ) Y\n\n(y )dy ~~\n\n(n + 1)PY (n + 1) -EY {Y ; Y < y } PY {Y > y }\n\ny 1 -x ; x, y xe\n\n>0\n\nTable 1: Prior-free estimation formulas. Functions written with hats or in terms of represent multiplication in the Fourier Domain. n replaces y for discrete distributions. Bracketed numbers are references for operators L, with * denoting references for the parametric (dual) operator, L .\n\n4\n4.1\n\nSimulations\nNon-parametric examples\n\nSince each of the prior-free estimators discussed above relies on approximating values from the observed data, the behavior of such estimators should approach the BLS estimator as the number of data samples grows. In Fig. 1, we examine the behavior of three non-parametric prior-free estimators based on Eq. (4). The first case corresponds to data drawn independently from a binary source, which are observed through a process in which bits are switched with probability 1 . The estimator 4 does not know the binary distribution of the source (which was a \"fair coin\" for our simulation), but does know the bit-switching probability. For this estimator we approximate PY using a simple histogram, and then use the matrix version of the linear operator in Eq. (3). We characterize the behavior of this estimator as a function of the number of data points, N , by running many Monte Carlo simulations for each N and indicating the mean improvement in MSE (compared with the ML estimator, which is the identity function), the mean improvement using the conventional BLS estimation function, E {X |Y = y} assuming the prior density is known, and the standard deviations of the improvements taken over our simulations. Figure 1b shows similar results for additive Gaussian noise, with SNR replacing MSE. Signal density is a generalized Gaussian with exponent 0.5. In this case, we compute Eq. (4) using a more\n\n\f\n0.2 0.1 MSE improvement\n\n3 2.5 SNR improvement 2 1.5 1 0.5 02 10\nSNR improvement\n3 4 5\n\n5 4 3 2 1 0 -1 -2\n\n0 -0.1 -0.2 -0.3 0 10\n\n10\n\n1\n\n10 # samples\n\n2\n\n10\n\n3\n\n10\n\n4\n\n10\n\n10 # samples\n\n10\n\n-3 2 10\n\n10\n\n3\n\n10 # samples\n\n4\n\n10\n\n5\n\n10\n\n6\n\n(a)\n\n(b)\n\n(c)\n\nFig. 1: Empirical convergence of prior-free estimator to optimal BLS solution, as a function number of observed samples of Y . For each number of observations, each estimator is simulated many times. Black dashed lines show the improvement of the prior-free estimator, averaged over simulations, relative to the ML estimator. White line shows the mean improvement using the conventional BLS solution, E {X |Y = y}, assuming the prior density is known. Gray regions denote one standard deviation. (a) Binary noise (10,000 simulations for each number of observations); (b) additive Gaussian noise (1,000 simulations); (c) Poisson noise (1,000 simulations). sophisticated approximation method, as described in [8]. We fit a local exponential model similar to that used in [9] to the data in bins, with binwidth adaptively selected so that the product of the number of points in the bin and the squared binwidth is constant. This binwidth selection procedure, analogous to adaptive binning procedures developed in the density estimation literature [10], provides a reasonable tradeoff between bias and variance, and converges to the correct answer for any well-behaved density [8]. Note that in this case, convergence is substantially slower than for the binary case, as might be expected given that we are dealing with a continuous density rather than a single scalar probability. But the variance of the estimates is very low. Figure 1c shows the case of estimating a randomly varying rate parameter that governs an inhomogeneous Poisson process. The prior on the rate (unknown to the estimator) is exponential. The observed values Y are the (integer) values drawn from the Poisson process. In this case the histogram of observed data was used to obtain a naive approximation of PY (n). It should be noted that improved performance for this estimator is expected if we were to use a more sophisticated approximation of the ratio of densities. 4.2 Parametric examples\n\nIn this section we discuss the empirical behavior of the parametric approach applied to the additive Gaussian case. From the derivation in section 3, and restricting to the scalar case, we have L = y - 2 d . dy\n\nIn this particular case,, it is easier to represent the estimator as f (y ) = y + g (y ). Substituting into Eq. (5) gives E {|f (Y ) - X |2 } = E {|g (Y )|2 + 2 g (Y )} + const, where the constant does not depend on g . Therefore, if we have a parametric family {g } of such g , and are given data {Yn } we can try and minimize\nN 1n {|g (Yn )|2 + 2 g (Yn )}. N =1\n\n(12)\n\nThis expression, known as Stein's unbiased risk estimator (SURE) [4], favors estimators g that have small amplitude, and highly negative derivatives at the data values. This is intuitively sensible: the resulting estimators will \"shrink\" the data toward regions of high probability. Recently, an expression similar to Eq. (12) was used as a criterion for density estimation in cases where the normalizing constant, or partition function, is difficult to obtain [11]. The prior-free\n\n\f\nFig. 2: Example bump functions, used for linear parameterization of estimators in Figs. 3(a) and 3(b).\n3 2.5 SNR improvement SNR improvement 2 1.5 1 0.5 02 10 3 2.5 2 1.5 1 0.5 02 10 SNR improvement\n3 4 5\n\n3 2.5 2 1.5 1 0.5 02 10\n\n10\n\n3\n\n10 # samples\n\n4\n\n10\n\n5\n\n10\n\n10 # samples\n\n10\n\n10\n\n3\n\n10 # samples\n\n4\n\n10\n\n5\n\n(a)\n\n(b)\n\n(c)\n\nFig. 3: Empirical convergence of parametric prior-free method to optimal BLS solution, as a function number of data observations, for three different parameterized estimators. (a)3 bump; (b)15 bumps; (c) Soft thresholding. All cases use a generalized Gaussian prior (exponent 0.5), and assume additive Gaussian noise. approach we are discussing provides an interpretation for this procedure: the optimal density is the one which, when converted into an estimator using the formula in Table 1 for the additive Gaussian case, gives the best MSE. This may be extended to any of the linear operators in Table 1. As an example, we parametrize g as a linear combination of nonlinear \"bump\" functions k k gk (y ) g (y ) = where the functions gk are of the form 1 (13)\n\n, k sgn(y ) log2 (|y |/ + 1) - gk (y ) = y cos 2 as illustrated in Fig. 2. Recently, linear parameterizations have been used in conjunction with Eq. (12) for image denoising in the wavelet domain [12].\n2\n\nWe can substitute Eq. (13) into Eq. (12) and pick coefficients {k } to minimize this criteria, which is a quadratic function of the coefficients. For our simulations, we used a generalized Gaussian prior, with exponent 0.5. Figure 3 shows the empirical behavior of these \"SURE-bump\" estimators when using three bumps ( Fig. 3a) and fifteen bumps (Fig. 3b), illustrating the bias-variance tradeoff inherent in the fixed parameterization. Three bumps behaves fairly well, though the asymptotic behavior for large amounts of data is biased and thus falls short of ideal. Fifteen bumps asymptotes correctly but has very large variance for small amounts of data (overfitting). For comparison purposes, we have included the behavior of SURE thresholding [13], in which Eq. (4.2) is used to choose an optimal threshold, , for the function f (y ) = sgn(y )(|y | - )+ . As can be seen, SURE thresholding shows significant asymptotic bias although the variance behavior is nearly ideal.\n\n5\n\nDiscussion\n\nWe have reformulated the Bayes least squares estimation problem for a setting in which one knows the observation process, and has access to many observations. We do not assume the prior density\n\n\f\nis known, nor do we assume access to samples from the prior. Our formulation thus acts as a bridge between a conventional Bayesian setting in which one derives the optimal estimator from known prior and likelihood functions, and a data-oriented regression setting in which one learns the optimal estimator from samples of the prior paired with corrupted observations of those samples. In many cases, the prior-free estimator can be written explicitly, and we have shown a number of examples to illustrate the diversity of estimators that can arise under different observation processes. For three simple cases, we developed implementations and demonstrated that these converge to optimal BLS estimators as the amount of data grows. We also have derived a prior-free formulation of the MSE, which allows selection of an estimator from a parametric family. We have shown simulations for a linear family of estimators in the additive Gaussian case. These simulations serve to demonstrate the potential of this approach, which holds particular appeal for real-world systems (machine or biological) that must learn the priors from environmental observations. Both methods can be enhanced by using data-adaptive parameterizations or fitting procedures in order to properly trade off bias and variance (see, for example [8]). It is of particular interest to develop incremental implementations, which would update the estimator based on incoming observations. This would further enhance the applicability of this approach for systems that must learn to do optimal estimation from corrupted observations. Acknowledgments This work was partially funded by the Howard Hughes Medical Institute, and by New York University through a McCracken Fellowship to MR.\n\nReferences\n[1] G. Casella, \"An introduction to empirical Bayes data analysis,\" Amer. Statist., vol. 39, pp. 83 87, 1985. [2] J. S. Maritz and T. Lwin, Empirical Bayes Methods. Chapman & Hall, 2nd ed., 1989. [3] J. Berger, \"Improving on inadmissible estimators in continuous exponential families with applications to simultaneous estimation of gamma scale parameters,\" The Annals of Staistics, vol. 8, pp. 545571, 1980. [4] C. M. Stein, \"Estimation of the mean of a multivariate normal distribution,\" Annals of Statistics, vol. 9, pp. 11351151, November 1981. [5] J. T. Hwang, \"Improving upon standard estimators in discrete exponential families with applications to poisson and negative binomial cases,\" The Annals of Staistics, vol. 10, pp. 857867, 1982. [6] K. Miyasawa, \"An empirical bayes estimator of the mean of a normal population,\" Bull. Inst. Internat. Statist., vol. 38, pp. 181188, 1956. [7] H. Robbins, \"An empirical bayes approach to statistics,\" Proc. Third Berkley Symposium on Mathematcal Statistics, vol. 1, pp. 157163, 1956. [8] M. Raphan and E. P. Simoncelli, \"Empirical Bayes least squares estimation without an explicit prior.\" NYU Courant Inst. Tech. Report, 2007. [9] C. R. Loader, \"Local likelihood density estimation,\" Annals of Statistics, vol. 24, no. 4, pp. 16021618, 1996. [10] D. W. Scott, Multivariate Density Estimation: Theory, Practice, and Visualization. John Wiley, 1992. [11] A. Hyvarinen, \"Estimation of non-normalized statistical models by score matching,\" Journal of Machine Learning Research, vol. 6, pp. 695709, 2005. [12] F. Luisier, T. Blu, and M. Unser, \"SURE-based wavelet thresholding integrating inter-scale dependencies,\" in Proc IEEE Int'l Conf on Image Proc, (Atlanta GA, USA), pp. 14571460, October 2006. [13] D. Donoho and I. Johnstone, \"Adapting to unknown smoothness via wavelet shrinkage,\" J American Stat Assoc, vol. 90, December 1995.\n\n\f\n", "award": [], "sourceid": 3001, "authors": [{"given_name": "Martin", "family_name": "Raphan", "institution": null}, {"given_name": "Eero", "family_name": "Simoncelli", "institution": null}]}