The present disclosure relates generally to machine learning. More particularly, the present disclosure relates to approximate Bayesian learning, for example, for logistic regression and/or probit regression in a sparse online setting.
Logistic regression is the bread and butter of machine learning systems. Online methods for optimizing logistic regression are suboptimal, and as such are missing opportunities to improve predictions, especially in cases where the expedient learning of new features is beneficial. Additionally, predictions are typically used to produce point estimates, and lack accurate uncertainty information about the examples on which they predict. Such good estimates would benefit the system by allowing to utilize predictions better downstream. Many systems predict with a huge set of sparse features, out of which only a small set occurs in each example. Existing methods that try to approximate Bayesian inference are heavy, complex, and suboptimal. They are not well geared towards sparse problems,
In particular, theoretical results show that Bayesian methods can achieve lower bounds on regret for online logistic regression. In practice, however, such techniques may not be feasible especially if the feature set is very large. Various approximations that, for huge sparse feature sets, diminish the theoretical advantages, must be used. Often, such approximations apply stochastic gradient methods with parameters that must be tuned on some surrogate loss, defeating the theoretical nonparametric advantages of Bayesian methods. The surrogate loss is defined to approximate the mixture and requires techniques like Monte Carlo sampling that increase the number of computations per example, and are not feasible if one desires performance close to the theoretical limits, which would require thousands of samples to achieve.
Aspects and advantages of embodiments of the present disclosure will be set forth in part in the following description, or can be learned from the description, or can be learned through practice of the embodiments.
One example aspect of the present disclosure is directed to a computer-implemented method to perform online learning of machine learning models that is computationally efficient even with extreme numbers of features. The method includes obtaining, by a computing system comprising one or more computing devices, a machine-learned model comprising a respective mean parameter value and a respective variance parameter value for each of a plurality of features. The method includes, for each of one or more online learning examples: receiving, by the computing system, a new online learning example having a plurality of values for the plurality of features; processing, by the computing system, the new online learning example with the machine-learned model to generate a prediction for the new online learning example; observing, by the computing system, an actual outcome associated with the new online learning example; and, for each feature for which the new online learning example has a non-zero value: determining, by the computing system, an approximate posterior for the feature conditioned on the actual outcome, wherein the approximate posterior approximates a posterior expressed as a prior of the feature multiplied by a likelihood marginalized on all other features with a self-excluding prior and normalized by the prediction, wherein the self-excluding prior comprises a marginal prior of all the other features combined together, wherein determining the approximate posterior comprises determining an updated mean parameter value for the feature and an updated variance parameter value for the feature.
Another example aspect of the present disclosure is directed to a computing system configured to perform learning of machine learning models that is computationally efficient even with extreme numbers of features. The computing system includes one or more processors and one or more non-transitory computer-readable media that collectively store instructions that, when executed by the one or more processors cause the one or more processors to perform operations. The operations include obtaining, by the computing system, a machine-learned model comprising one or more weights for each of a plurality of features. The operations include, for each of one or more learning examples: receiving, by the computing system, a learning example having a plurality of values for the plurality of features; processing, by the computing system, the learning example with the machine-learned model to generate a prediction for the learning example; accessing, by the computing system, a true label associated with the new learning example; and, for each feature for which the learning example has a non-zero value: determining, by the computing system, an approximate posterior for the feature conditioned on the actual outcome, wherein the approximate posterior approximates a posterior expressed as a prior of the feature multiplied by a likelihood marginalized on all other features with a self-excluding prior and normalized by the prediction, wherein the self-excluding prior comprises a marginal prior of all the other features combined together, wherein determining the approximate posterior comprises determining an updated mean parameter value for the feature and an updated variance parameter value for the feature.
Another example aspect of the present disclosure is directed to one or more non-transitory computer-readable media that collectively store instructions that, when executed by one or more processors cause the one or more processors to perform operations. The operations include obtaining a machine-learned model comprising a respective mean parameter value and a respective variance parameter value for each of a plurality of features. The operations include, for each of one or more marginalized Bayesian learning iterations: receiving a learning example having a plurality of values for the plurality of features; processing the learning example with the machine-learned model to generate a prediction for the learning example; accessing a true label associated with the new learning example; and, for each feature for which the learning example has a non-zero value: determining a probability of the true label as a function of an updated mean parameter value for the feature and shrunk as a function of a self-excluding variance of the feature; and solving a minimization of the probability of the true label to determine the updated mean parameter value for the feature and an updated variance parameter value for the feature.
Other aspects of the present disclosure are directed to various systems, apparatuses, non-transitory computer-readable media, user interfaces, and electronic devices.
These and other features, aspects, and advantages of various embodiments of the present disclosure will become better understood with reference to the following description and appended claims. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate example embodiments of the present disclosure and, together with the description, serve to explain the related principles.
Detailed discussion of embodiments directed to one of ordinary skill in the art is set forth in the specification, which makes reference to the appended figures, in which:
Reference numerals that are repeated across plural figures are intended to identify the same features in various implementations.
Generally, the present disclosure is directed to systems and methods that leverage low complexity (e.g., linear overall, fixed per example) analytical approximations to perform machine learning problems such as, for example, the sparse online logistic regression problem. Unlike variational inference and other methods, the proposed systems and methods lead to analytical closed forms, lowering the practical number of computations. Further, unlike techniques used for dense features sets, such as Gaussian Mixtures, the proposed systems and methods allow for sparse problems with huge feature sets without increasing complexity. With the analytical closed forms, there is also no need for applying stochastic gradient methods on surrogate losses, and for tuning and balancing learning and regularization parameters of such methods. Example empirical results obtained on synthetic data demonstrate superior performance by the proposed techniques related to more computationally involved methods. However, like such more computationally involved methods, the proposed techniques still reveal per feature and per example uncertainty measures.
In particular, the present disclosure demonstrates that it is sufficient to approximate the component of the posterior which will dominate at the horizon, matching it by a diagonal Gaussian approximation, but avoiding matching (a bound on) the full posterior, as done by Variational Bayesian Inference (VB) methods. While matching the posterior may lead to comparable performance, it brings unnecessary complexity to the real goal of preserving the effects of a good prior on the regret. Specifically, in an online setting, matching the full range of the posterior can lead to poor generalization and overfitting if matching tails is at the expense of important parts of the distribution. Unlike VB methods, that approximate an upper bound on the loss and apply expectation on the bound, example marginalization techniques described herein apply updates directly on the current approximate of the posterior. Instead of matching a multivariate distribution, as done for dense methods, example implementations leverage sparsity and diagonalization by marginalizing on all features except the one being updated.
The systems and methods of the present disclosure provide a number of technical effects and benefits. As one example, the present disclosure provides systems and methods that through proper marginalization and approximation with the proper prior are able to achieve regret as good as the possible regret lower bounds. The proposed systems and methods provide faster convergence and learning than existing methods and also give an uncertainty estimate which is better than existing ones and can be used for a variety of problems. One core concept embodied in example implementations described herein is to wisely leverage Bayesian mixtures and marginalization, where a feature is updated by marginalizing over all other features. The approximation gives very simple low-complexity updates that do not require heavy sampling and/or iterations. By obviating the need to perform heavy sampling and/or iterations, the proposed techniques reduce the consumption of computing resources such as processor usage, memory usage, network bandwidth usage, etc.
As another example technical effect, the proposed techniques can improve any online system that performs prediction and can also be used in many batch training approaches, to speed up convergence, and to minimize use of multiple epochs. The proposed techniques also both provide good uncertainty estimates and lower uncertainty relative to other techniques.
Let ρt(w) be the prior on the weights at round t, where we start by initializing some ρ1(w). We will assume that ρ(⋅) is approximated by a diagonal covariance Gaussian, with means μi,t and variances σi,t2 for component i at time t. If we restrict wi∈[−B, B], a uniform prior over this interval or a normal prior with standard deviation proportional to B can be picked. (To approximate a Dirichlet-½ (a Beta-½ prior—which is known to be optimal for a single dimensional problem), 0-mean normal prior with variance 2π can be used.) Observing sparse xt, the prediction for yt is given by
p
t
P(yt|xt)=∫wp(yt|xt,w)ρt(w)dw∫wpt(yt,w|xt)dw, (1)
where for binary logistic regression, the probability of the label given the example and weights is given by the Sigmoid of the label weighted dot product of the example and weights
The expected prediction pt in (1) marginalizes out the weights w according to the prior ρt(⋅) from the joint probability of w and yt. The prediction pt is a function also of all prior pairs sequence {xt-1, yt-1} through the prior ρt(⋅). After observing yt, we try to match a (diagonal) posterior Q(⋅) to the weights that will equal the next round's prior
Using ST{xT, yT}, the logarithmic loss incurred by approximation Q(⋅) on the sequence of predictions is L(ST, Q)Σt=1T log pt. Let w* be some fixed comparator in the parameter values' space. Then, the regret of approximation Q(⋅) relative to comparator w* is given by
R(ST,Q,w*)L(ST,Q)−L(ST,w*)=−Σt=1T[log pt+log(1+exp(−ytxtw*)]. (4)
The regret can measure the excess loss relative to the best possible w* comparator, if it is chosen.
This section describes example, non-limiting implementations of the proposed method. In some implementations, first, the Sigmoid is approximated by a normal Cumulative Distribution Function (CDF). A prediction for the label of the current example is generated shrinking the cumulative mean score as function of the cumulative variance over all features. The main idea for updating feature distributions is marginalizing away all other covariates for each feature in an example at a given round, such that the mean and variance of the feature can be updated to match the location of the peak and either its curvature or value to the true marginalized posterior. An example approach for Probit Regression can follow the same steps, except that it does not require the initial approximation. Similar approximation methodology can be used to apply simple multi-dimensional updates instead of a marginalized one, and can be performed when sparsity is limited.
Gaussian Approximation of a Sigmoid: The relation between the logistic distribution and the Normal one was well studied in the statistics literature. The Sigmoid function in (2) can be viewed as a CDF, which can be approximated by a normal CDF Φ(z) (The inverse of Φ(⋅) is the Probit function.) The derivative of the Sigmoid function is the 0-mean Logistic Probability Density Function (PDF). Matching the PDFs, we have ew/(1+ew)2≈1/√{square root over (2πσ2)}exp{−w2/2σ2}. This yields that the Sigmoid function can be approximated by a 0-mean Gaussian CDF with variance 8/π. Using the standard 0-mean normal Φ(⋅) function, the argument is scaled by the inverse of the standard deviation √{square root over (π/8)}, giving
Approximation approach and some notation: With the diagonal and Gaussian assumptions, for each sparse example (with only dt<<d nonzero entries in xt), we can assume that we have a single normal random variable, whose mean is the xt weighted mean of covariate weights, and whose variance is the quadratically weighted sum of variances. Denote the example total weight, mean, and variance by
w
t
Σi=1dxi,twi,t,μtΣi=1dxi,t·μi,t,σt2Σi=1dxi,t2·σi,t2 (6)
(where the diagonalization assumption is important for the simplicity of the approximation of σt2).
Since we consider a sparse problem, there is benefit to breaking the dependencies between features present in a given example and updating each independently. We can achieve that by marginalizing the prior at t over all other features. Because we assume all features are jointly independent Gaussians, we can break the joint prior into a product of two components; one, the marginal of the feature, and the other the marginal of all other features together, i.e., the self excluding prior. To match the posterior, we then marginalize on the latter, and match a single dimensional posterior for each feature. We define the self excluding prior for feature i at time t, its mean and variance as
Prediction: With the probit approximation in (5) and the single dimensional variable wt, we can compute pt in (1), replacing p(yt|xt,w) in (2) by a normal CDF. Approximating this integral (see, e.g. [Murphy(2012)], Section 8.4.4.2, and [Bishop(2006)]) gives
This result demonstrates how the prediction variance shrinks the prediction towards probability 0.5.
Marginalization: Given the diagonalization assumption, the prior at t can be expressed as ρt(w)=ρi,t(wi)·ρ−i,t(w−i), where ρ−i,t(⋅) is the prior on the self excluding prior of wi. Hence,
p(yt,w|xt)=p(yt|xt,w)ρi,t(wi)ρ−i,t(w−i). (9)
Marginalizing on w−i gives
p(yt,wi|xt)=ρi,t(wi)∫−∞∞(yt|xt,w)ρ−i,t(w−i)dw−iρi,t(wi)IW
The inner integral, which marginalizes over w−i with its prior ρ−i,t(w−i), can be approximated by
Step (a) follows, again, from the approximation in (5). For (b), we apply the change of variables z=(w−i−μ−i,t)/σ−i,t, where ϕ(⋅) is the standard Gaussian PDF. The integral in (b) gives
with
to lead to (c). Finally, the approximation in (5) is used to go back from a Normal CDF to a Sigmoid in (d).
Posterior: The posterior on wi is given by plugging (11) into (10) normalizing by pt given in (1).
The approximation on the right implies matching the current true posterior with the ith component of the approximate posterior Q(⋅). It can be simplified to
Approximations: Because the functional form of the posterior is not Gaussian, there are multiple ways to fit a Gaussian. However, we want to ensure that the regions of the true posterior we are most likely to converge to at the horizon are not scaled down too much, as this will incur additional loss. It is thus desirable to match the peak of the true posterior with the peak of the approximation. One method is to match both the location and height of the peak. The other, Laplace approximation, matches the location and curvature at the peak. Both methods give the same approximate for μi,t+1, but a somewhat different one for σi,t+12.
To give μi,t+1, we find wi that maximizes the r.h.s. of (13), or minimizes its negative logarithm. Let
be almost pt in (8), except that μi,t+1 replaces μi,t and σ−i,t2 replaces σt2. Thus pi,t+ is the probability predicted for yt if we update μi,t and shrink as function of σ−i,t2. The minimization gives
Eq. (15) can be solved iteratively, where Newton's method can be used. The solution for μi,t+1 can also be expressed in terms of the r generalized Lambert W function [Corless et˜al. (1996) Corless, Gonnet, Hare, Jeffrey, and Knuth, Mezo Baricz (2015) Mezo and Baricz].
Alternatively, to avoid multiple iterations per update when using Newton's method, we can use a Taylor series approximation of 1−pi,t+ around 1−pi,t, where
Like pi,t+, pi,t is not pt. Instead, it is the probability of yt as projected by the means of the weights at t, shrunk as function of σ−i,t2 instead of σt2. More importantly, it depends only on parameters before the update at t+1 is applied, giving a closed form solution. Applying first order approximation we have
If may be simpler to store the precision 1/σi,t2, in which case, (17) may be easier to compute by normalizing both numerator and denominator by σi,t2, applying this normalization on the right term of the denominator. Second or higher orders approximations can also be applied, but may not be necessary, as the first order one already gives identical performance to the iterative method.
After updating μi,t+1, we can apply (13) to update σi,t+1. Plugging (15) in (13), we solve for σi,t+1,
Alternatively to (18), Laplace approximation can be used by finding the second derivative of the negative logarithm of the posterior, giving
An example implementation of the procedures described is summarized in Algorithm 1, reproduced below and also in
The Sigmoid function, which converts log-odds to probability is very close in shape to the Gaussian Cumulative Distribution Function (CDF) Φ(z), as well established in the statistics literature. The derivative of the Sigmoid function is given by
and equals the PDF of a 0-mean Logistic distribution. We can approximate the logistic PDF by a Gaussian by matching the PDFs,
Matching the distributions at w=0 yields σ=√{square root over (8/π)},
Thus, we can approximate the Sigmoid with a 0-mean Gaussian CDF with variance 8/π, giving (5).
In this section, we show the derivation of the method proposed in this paper for Probit Regression, where, in a similar manner to (2), the predicted label probability with weight vector w, label yt, and covariates xt is given by the normal CDF
where, as we recall, ϕ(⋅) and Φ(⋅) are the standard Gaussian (normal) PDF and CDF, respectively. While for logistic regression, we used a Gaussian approximation to obtain analytical expressions for the prediction in (8) and the marginalization integral in (11), for probit regression, these are no longer approximations. For the posterior, we will still apply a Gaussian and a diagonal approximations, as in the derivations based on (13).
Prediction: The approach for probit regression is similar to the one described in Section 3 for logistic regression. For each feature we track the mean μi,t and the variance σi,t2 for the ith feature. For example t, we use (6) to compute the total weight wt, its mean μt and variance σt2. Eq. (7) gives the self excluding weights, their means, and their variances. Similarly to (8), using the approximate normal prior at t, we can derive the label prediction for yt,
For (a), we use the definition of wt in (6). Step (b) follows from substituting v=(wt−μt)/σt. Step (c) identified the integrands as a product of the standardized N(0,1) normal PDF multiplied by a standardized normal CDF at yt(σtv+μt). This integral gives a normal
for a=ytμt and b2=yt2σt2=σt2 at leading to (d).
Marginalization: Following the marginalization steps described herein, we can express the joint probability of weight wt and label yt conditioned on the covariates xt and marginalized over all the other nonzero covariates at example t as in (10) by
where we use the steps of (11), excluding the approximations, to derive (25).
Posterior: The posterior on wt is given as in (12), normalizing p (yt, wi|xt) by pt from (24).
This posterior can now be matched by a normal posterior Qt,t(wi) as in (13).
Approximation: Here, we follow the Laplace approximation applied in Section 3. All other methods mentioned in the paper are also possible. To find μi,t+1 that minimizes the negative logarithm of the r.h.s. of (26), define, similarly to (14),
as the probit score, which serves as the argument of the normal CDF, where the ith mean has been updated, but all other means have not. We can now express the update of the ith mean by
Eq. (28) is a similar update for probit regression to that of (15) for logistic regression, where the ratio ϕ(zi,t+)/Φ(zi,t+) replaces 1−pi,t+ (and the scaling of the self excluding variance is unnecessary).
As (15), (28) must be solved iteratively because the term ϕ(zi,t+)/Φ(zi,t+) is a function of μi,t+1 through the definition of zi,t+. As in Section 3, we can use a first order Taylor approximation of ϕ(zi,t+)/Φ(zi,t+) around its value for μi,t. Similarly to (16), we define
which is the score before update of all means μi,t, but unlike the one used to compute pt, normalized by the ith self excluding variance σ−i,t2 instead of σt2. With some algebra, this gives a single operation update, similar to that in (17), given by
The term zi,t+ϕ(zi,t)/Φ(zi,t) in the denominator replaces pi,t in the logistic regression update equation.
Taking the second derivative of the negative logarithm of the posterior and approximating 1/σi,t+12 by it, gives a single operation update of the variance, similarly to (19),
Instead of marginalizing on all other features to update wi for which xi,t≠0, we can apply multi-dimensional update on all features for which xi,t≠0 at round t. Such updates will enhance correlation between these features, and may be a better fit to problems in which such correlation is expected. For this update, we assume that the true posterior consists of a product between a prior with a diagonal covariance matrix and a Sigmoid, and we apply Lapace approximation to obtain new mean vector and covariance. With some abuse of notation, let all values at t consist only of the dt nonzero components of xt. Let Σt be the diagonal covariance matrix, with diagonal elements σi,t2. Let ut be the estimated mean vector at t. Then, the true posterior at t is given by
Similarly to (14), define
p
t+
Sigma(ut+1) (36)
as the probability of yt computed with weights after they had been updated (and this time with no shrinkage), where ut+1 is the updated vector of means. Then, with Laplace approximation, taking the value of the mean vector that maximizes the posterior, the mean can be updated as in (15) by
u
t+1
=u
t+Σtytxt(1−pt+). (37)
This is, again, an equation that must be solved either numerically, or using methods such as Newton's method. Again, we can assign ut+1(0)=ut, and apply (36) on it to obtain pt+(0). Then, at iteration ,
=Σt−1(−ut)−ytxt·(1−) (38)
and
=Σt−1+yt2xt··(1−). (39)
Then, ut+1 is updated by
=−. (40)
Termination is either when the update on all components of ut+1 is less than some threshold, or after a set number of iterations. Inverting the Hessian H also gives the updated covariance Σt+1, whose diagonal elements can be now used to update σi,t+12, if we apply the algorithm for a sparse problem, where it is infeasible to store all covariances.
Instead of updating , we can keep track of its inverse , and there is no need to invert the covariance matrix Σt. With the diagonal form of Σt, all operations can be implemented with linear complexity in dt using the [Sherman Morrison (1950) Sherman and Morrison] formula, which simplifies matrix inversions for special matrices. For our specific need here, if A is some matrix, α some constant, and x some vector, then, the Sherman-Morrison formula is
Substituting A=Σt−1, x=xt, and α=(1−), we update , inverting (39).
As in the marginalization method described in Section 3, we can avoid the iterative Newton method with a first order Taylor approximation of 1−pt+ around 1−{tilde over (p)}t, where {tilde over (p)}t is defined in an analogy to (16) as
{tilde over (p)}
t
Sigma() (42)
as the un-shrunk prediction of yt at round t (which is different from pt, which is shrunk by the variance). The approximation leads to the following set of equations to update both ut+1 and Σt+1. For simplification, define
v
t=Σtxt. (43)
Then, temporarily update Σt, using Sherman-Morrison formula, to
Since Σt is diagonal, the transpose on the last term of the numerator in the first equality is unnecessary. The second equality gives vector multiplications, showing that the complexity is linear in the dimension of the vectors dt. (This is true also to the computation of vt when Σt is diagonal.) Next, ut+1 can be updated
u
t+1
=u
t
+y
t(1−{tilde over (p)}t){tilde over (Σ)}t+1xt. (45)
Now, we can update pt+ in (36), using ut+1, and use it to update Σt+1 using Sherman-Morrison,
In the sparse case, we can now take the terms of the diagonal of Σt+1 to update σi,t+12 of the nonzero covariates at round t.
Finally, it may be simpler to update the precision matrix Ht+1=Σt+1−1 instead of the covariance Σt+1. Specifically, if multiple updates are performed in a mini batch, the update applied to the covariance cannot be applied additively. However, additive updates on the precision are valid. Thus the updates in (44) and (46) can be replaced by
{tilde over (H)}
t+1
=H
t
+y
t
2
{tilde over (p)}
t(1−{tilde over (p)}t) (47)
and
H
t+1
=H
t
+y
t
2
p
t+(1−pt+) (48)
respectively. To update ut+1, we still need to invert {tilde over (H)}t+1. We can use (44) if an update was applied to a single round only. If a mini-batch update additively applied multiple updates at once in (47), the updated {tilde over (H)}t+1 must be inverted to obtain {tilde over (Σ)}t+1.
The multi-dimensional approach described in this section can be applied to sparse problems, but also to dense problems. In the dense case, the operation in (43) is no longer linear in dt, as the covariance matrix is not necessarily diagonal. The use of Sherman-Morrison formula, however, to invert the precision and covariance, still applies and lowers the complexity of the approach. In the sparse problem, however, this approach may try to force correlations that are not there, that are then ignored. As empirical results suggest, it may not be as good as the marginalization approach because of that. Furthermore, unlike other marginalization approaches described herein, which achieve best performance if the true prior matches the one used to initialize the algorithm, empirical results demonstrate that the best performances are obtained with priors that are different from the true one with the multi-dimensional method when applied on sparse problems.
Method 12 can begin at Block 14. Block 14 can include obtaining, by a computing system comprising one or more computing devices, a machine-learned model comprising a respective mean parameter value and a respective variance parameter value for each of a plurality of features.
In some implementations, the machine-learned model is or includes a regression model such as, for example, a logistic regression model such as, for example, a binary logistic regression model. In some implementations, the machine-learned model is or includes a wide and deep model (see, e.g., Cheng et al., Wide & Deep Learning for Recommender Systems, arxiv: 1606.07792).
In some implementations, a number of the plurality of features exceeds one billion.
Block 16 can include receiving, by the computing system, a new online learning example having a plurality of values for the plurality of features.
In some implementations, the new online learning example is sparse in the plurality of features. In other implementations, sparseness is not limited and similar dense updates are provided. For example, a dense update without marginalization can be used over the other features, but with the same approximations leading to either a Newton method solution or a closed form solution for the updates.
Block 18 can include processing, by the computing system, the new online learning example with the machine-learned model to generate a prediction for the new online learning example.
In some implementations, processing, by the computing system, the new online learning example with the machine-learned model to generate the prediction for the new online learning example can include: determining, by the computing system, a total mean parameter value across all features and a total variance parameter value across all features; and determining, by the computing system, the prediction with a standard computed at an expected mean over all features normalized by a shrinkage term that equals a square root of a total variance computed over all features whose value is not 0 for the new online learning example scaled by pi over 8 and added to 1. For the probit case, this may not be necessary to scale.
In some implementations, a produced variance is an estimate of an uncertainty for the new online learning example.
In some implementations, the prediction comprises a predicted level of user interest in a content item.
Block 22 can be respectively performed for each feature for which the new online learning example has a non-zero value.
Block 22 can include determining, by the computing system, an approximate posterior for the feature conditioned on the actual outcome, wherein the approximate posterior approximates a posterior expressed as a prior of the feature multiplied by a likelihood marginalized on all other features with a self-excluding prior and normalized by the prediction, wherein the self-excluding prior comprises a marginal prior of all the other features combined together, wherein determining the approximate posterior comprises determining an updated mean parameter value for the feature and an updated variance parameter value for the feature.
In some implementations, this method can also be used in a mini-batch or batch setting, where a batch of examples is updated with the same method, instead of just a single example. In some implementations, for the batch usage, instead of updating the variance, an implementing system can update the precision (the inverse of the variance). This update can be additive (as well as the update of the mean), so the batch processing is just a sum of the single example update.
In some implementations, for each feature for which the new online learning example has a non-zero value, the self-excluding prior is computed as a single probability distribution aggregating an effect of all the other features.
In some implementations, determining the updated mean parameter value for the feature can include performing Newton's method or using any other method (e.g., including an r generalized Lambert function) to solve a mean update function to determine the updated mean parameter value, the mean update function matching a peak of a current true posterior with a peak of the approximate posterior for the feature.
In some implementations, determining the updated mean parameter value for the feature can include solving a first or higher order approximation of a mean update function to determine the updated mean parameter value, the mean update function matching a peak of a current true posterior with a peak of the approximate posterior for the feature.
In some implementations, determining the approximate posterior for the feature can include determining the updated variance parameter value that approximately matches a current true posterior with the approximate posterior for the feature, either matching value or curvature at the peak of the true posterior or by matching other signals in the posterior distribution.
In some implementations, determining the updated mean and variance parameter values for the feature can include solving a minimization matching of a current true posterior with the approximate posterior for the feature, where matching is achieved on the posterior which is attained by marginalization of likelihood and self-excluding prior of all other features.
After Block 22, method 12 can optionally return to Block 16.
The user computing device 102 can be any type of computing device, such as, for example, a personal computing device (e.g., laptop or desktop), a mobile computing device (e.g., smartphone or tablet), a gaming console or controller, a wearable computing device, an embedded computing device, or any other type of computing device.
The user computing device 102 includes one or more processors 112 and a memory 114. The one or more processors 112 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, a FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 114 can include one or more non-transitory computer-readable storage mediums, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 114 can store data 116 and instructions 118 which are executed by the processor 112 to cause the user computing device 102 to perform operations.
In some implementations, the user computing device 102 can store or include one or more machine-learned models 120. For example, the machine-learned models 120 can be or can otherwise include various machine-learned models such as neural networks (e.g., deep neural networks) or other types of machine-learned models, including non-linear models and/or linear models. Neural networks can include feed-forward neural networks, recurrent neural networks (e.g., long short-term memory recurrent neural networks), convolutional neural networks or other forms of neural networks.
In some implementations, the one or more machine-learned models 120 can be received from the server computing system 130 over network 180, stored in the user computing device memory 114, and then used or otherwise implemented by the one or more processors 112. In some implementations, the user computing device 102 can implement multiple parallel instances of a single machine-learned model 120.
Additionally or alternatively, one or more machine-learned models 140 can be included in or otherwise stored and implemented by the server computing system 130 that communicates with the user computing device 102 according to a client-server relationship. For example, the machine-learned models 140 can be implemented by the server computing system 140 as a portion of a web service. Thus, one or more models 120 can be stored and implemented at the user computing device 102 and/or one or more models 140 can be stored and implemented at the server computing system 130.
The user computing device 102 can also include one or more user input component 122 that receives user input. For example, the user input component 122 can be a touch-sensitive component (e.g., a touch-sensitive display screen or a touch pad) that is sensitive to the touch of a user input object (e.g., a finger or a stylus). The touch-sensitive component can serve to implement a virtual keyboard. Other example user input components include a microphone, a traditional keyboard, or other means by which a user can provide user input.
The server computing system 130 includes one or more processors 132 and a memory 134. The one or more processors 132 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, a FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 134 can include one or more non-transitory computer-readable storage mediums, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 134 can store data 136 and instructions 138 which are executed by the processor 132 to cause the server computing system 130 to perform operations.
In some implementations, the server computing system 130 includes or is otherwise implemented by one or more server computing devices. In instances in which the server computing system 130 includes plural server computing devices, such server computing devices can operate according to sequential computing architectures, parallel computing architectures, or some combination thereof.
As described above, the server computing system 130 can store or otherwise include one or more machine-learned models 140. For example, the models 140 can be or can otherwise include various machine-learned models. Example machine-learned models include neural networks or other multi-layer non-linear models. Example neural networks include feed forward neural networks, deep neural networks, recurrent neural networks, and convolutional neural networks.
The user computing device 102 and/or the server computing system 130 can train the models 120 and/or 140 via interaction with the training computing system 150 that is communicatively coupled over the network 180. The training computing system 150 can be separate from the server computing system 130 or can be a portion of the server computing system 130.
The training computing system 150 includes one or more processors 152 and a memory 154. The one or more processors 152 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, a FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. The memory 154 can include one or more non-transitory computer-readable storage mediums, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 154 can store data 156 and instructions 158 which are executed by the processor 152 to cause the training computing system 150 to perform operations. In some implementations, the training computing system 150 includes or is otherwise implemented by one or more server computing devices.
In some implementations, the training system 150 can perform the Bayesian algorithm in this disclosure. Generally, it can replace other optimizers, but the system can also do multiple optimization tasks that also use other methods.
The training computing system 150 can include a model trainer 160 that trains the machine-learned models 120 and/or 140 stored at the user computing device 102 and/or the server computing system 130 using various training or learning techniques, such as, for example, backwards propagation of errors. For example, a loss function can be backpropagated through the model(s) to update one or more parameters of the model(s) (e.g., based on a gradient of the loss function). Various loss functions can be used such as mean squared error, likelihood loss, cross entropy loss, hinge loss, and/or various other loss functions. Gradient descent techniques can be used to iteratively update the parameters over a number of training iterations.
In some implementations, performing backwards propagation of errors can include performing truncated backpropagation through time. The model trainer 160 can perform a number of generalization techniques (e.g., weight decays, dropouts, etc.) to improve the generalization capability of the models being trained. In particular, the model trainer 160 can train the machine-learned models 120 and/or 140 based on a set of training data 162.
In some implementations, if the user has provided consent, the training examples can be provided by the user computing device 102. Thus, in such implementations, the model 120 provided to the user computing device 102 can be trained by the training computing system 150 on user-specific data received from the user computing device 102. In some instances, this process can be referred to as personalizing the model.
The model trainer 160 includes computer logic utilized to provide desired functionality. The model trainer 160 can be implemented in hardware, firmware, and/or software controlling a general purpose processor. For example, in some implementations, the model trainer 160 includes program files stored on a storage device, loaded into a memory and executed by one or more processors. In other implementations, the model trainer 160 includes one or more sets of computer-executable instructions that are stored in a tangible computer-readable storage medium such as RAM hard disk or optical or magnetic media.
The network 180 can be any type of communications network, such as a local area network (e.g., intranet), wide area network (e.g., Internet), or some combination thereof and can include any number of wired or wireless links. In general, communication over the network 180 can be carried via any type of wired and/or wireless connection, using a wide variety of communication protocols (e.g., TCP/IP, HTTP, SMTP, FTP), encodings or formats (e.g., HTML, XML), and/or protection schemes (e.g., VPN, secure HTTP, SSL).
The machine-learned models described in this specification may be used in a variety of tasks, applications, and/or use cases.
In some implementations, the input to the machine-learned model(s) of the present disclosure can be image data. The machine-learned model(s) can process the image data to generate an output. As an example, the machine-learned model(s) can process the image data to generate an image recognition output (e.g., a recognition of the image data, a latent embedding of the image data, an encoded representation of the image data, a hash of the image data, etc.). As another example, the machine-learned model(s) can process the image data to generate an image segmentation output. As another example, the machine-learned model(s) can process the image data to generate an image classification output. As another example, the machine-learned model(s) can process the image data to generate an image data modification output (e.g., an alteration of the image data, etc.). As another example, the machine-learned model(s) can process the image data to generate an encoded image data output (e.g., an encoded and/or compressed representation of the image data, etc.). As another example, the machine-learned model(s) can process the image data to generate an upscaled image data output. As another example, the machine-learned model(s) can process the image data to generate a prediction output.
In some implementations, the input to the machine-learned model(s) of the present disclosure can be text or natural language data. The machine-learned model(s) can process the text or natural language data to generate an output. As an example, the machine-learned model(s) can process the natural language data to generate a language encoding output. As another example, the machine-learned model(s) can process the text or natural language data to generate a latent text embedding output. As another example, the machine-learned model(s) can process the text or natural language data to generate a translation output. As another example, the machine-learned model(s) can process the text or natural language data to generate a classification output. As another example, the machine-learned model(s) can process the text or natural language data to generate a textual segmentation output. As another example, the machine-learned model(s) can process the text or natural language data to generate a semantic intent output. As another example, the machine-learned model(s) can process the text or natural language data to generate an upscaled text or natural language output (e.g., text or natural language data that is higher quality than the input text or natural language, etc.). As another example, the machine-learned model(s) can process the text or natural language data to generate a prediction output.
In some implementations, the input to the machine-learned model(s) of the present disclosure can be speech data. The machine-learned model(s) can process the speech data to generate an output. As an example, the machine-learned model(s) can process the speech data to generate a speech recognition output. As another example, the machine-learned model(s) can process the speech data to generate a speech translation output. As another example, the machine-learned model(s) can process the speech data to generate a latent embedding output. As another example, the machine-learned model(s) can process the speech data to generate an encoded speech output (e.g., an encoded and/or compressed representation of the speech data, etc.). As another example, the machine-learned model(s) can process the speech data to generate an upscaled speech output (e.g., speech data that is higher quality than the input speech data, etc.). As another example, the machine-learned model(s) can process the speech data to generate a textual representation output (e.g., a textual representation of the input speech data, etc.). As another example, the machine-learned model(s) can process the speech data to generate a prediction output.
In some implementations, the input to the machine-learned model(s) of the present disclosure can be latent encoding data (e.g., a latent space representation of an input, etc.). The machine-learned model(s) can process the latent encoding data to generate an output. As an example, the machine-learned model(s) can process the latent encoding data to generate a recognition output. As another example, the machine-learned model(s) can process the latent encoding data to generate a reconstruction output. As another example, the machine-learned model(s) can process the latent encoding data to generate a search output. As another example, the machine-learned model(s) can process the latent encoding data to generate a reclustering output. As another example, the machine-learned model(s) can process the latent encoding data to generate a prediction output.
In some implementations, the input to the machine-learned model(s) of the present disclosure can be statistical data. The machine-learned model(s) can process the statistical data to generate an output. As an example, the machine-learned model(s) can process the statistical data to generate a recognition output. As another example, the machine-learned model(s) can process the statistical data to generate a prediction output. As another example, the machine-learned model(s) can process the statistical data to generate a classification output. As another example, the machine-learned model(s) can process the statistical data to generate a segmentation output. As another example, the machine-learned model(s) can process the statistical data to generate a segmentation output. As another example, the machine-learned model(s) can process the statistical data to generate a visualization output. As another example, the machine-learned model(s) can process the statistical data to generate a diagnostic output.
In some implementations, the input to the machine-learned model(s) of the present disclosure can be sensor data. The machine-learned model(s) can process the sensor data to generate an output. As an example, the machine-learned model(s) can process the sensor data to generate a recognition output. As another example, the machine-learned model(s) can process the sensor data to generate a prediction output. As another example, the machine-learned model(s) can process the sensor data to generate a classification output. As another example, the machine-learned model(s) can process the sensor data to generate a segmentation output. As another example, the machine-learned model(s) can process the sensor data to generate a segmentation output. As another example, the machine-learned model(s) can process the sensor data to generate a visualization output. As another example, the machine-learned model(s) can process the sensor data to generate a diagnostic output. As another example, the machine-learned model(s) can process the sensor data to generate a detection output.
In some cases, the machine-learned model(s) can be configured to perform a task that includes encoding input data for reliable and/or efficient transmission or storage (and/or corresponding decoding). For example, the task may be audio compression task. The input may include audio data and the output may comprise compressed audio data. In another example, the input includes visual data (e.g. one or more image or videos), the output comprises compressed visual data, and the task is a visual data compression task. In another example, the task may comprise generating an embedding for input data (e.g. input audio or visual data).
In some cases, the input includes visual data and the task is a computer vision task. In some cases, the input includes pixel data for one or more images and the task is an image processing task. For example, the image processing task can be image classification, where the output is a set of scores, each score corresponding to a different object class and representing the likelihood that the one or more images depict an object belonging to the object class. The image processing task may be object detection, where the image processing output identifies one or more regions in the one or more images and, for each region, a likelihood that region depicts an object of interest. As another example, the image processing task can be image segmentation, where the image processing output defines, for each pixel in the one or more images, a respective likelihood for each category in a predetermined set of categories. For example, the set of categories can be foreground and background. As another example, the set of categories can be object classes. As another example, the image processing task can be depth estimation, where the image processing output defines, for each pixel in the one or more images, a respective depth value. As another example, the image processing task can be motion estimation, where the network input includes multiple images, and the image processing output defines, for each pixel of one of the input images, a motion of the scene depicted at the pixel between the images in the network input.
In some cases, the input includes audio data representing a spoken utterance and the task is a speech recognition task. The output may comprise a text output which is mapped to the spoken utterance. In some cases, the task comprises encrypting or decrypting input data. In some cases, the task comprises a microprocessor performance task, such as branch prediction or memory address translation.
The computing device 10 includes a number of applications (e.g., applications 1 through N). Each application contains its own machine learning library and machine-learned model(s). For example, each application can include a machine-learned model. Example applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc.
As illustrated in
The computing device 50 includes a number of applications (e.g., applications 1 through N). Each application is in communication with a central intelligence layer. Example applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc. In some implementations, each application can communicate with the central intelligence layer (and model(s) stored therein) using an API (e.g., a common API across all applications).
The central intelligence layer includes a number of machine-learned models. For example, as illustrated in
The central intelligence layer can communicate with a central device data layer. The central device data layer can be a centralized repository of data for the computing device 50. As illustrated in
The technology discussed herein makes reference to servers, databases, software applications, and other computer-based systems, as well as actions taken and information sent to and from such systems. The inherent flexibility of computer-based systems allows for a great variety of possible configurations, combinations, and divisions of tasks and functionality between and among components. For instance, processes discussed herein can be implemented using a single device or component or multiple devices or components working in combination. Databases and applications can be implemented on a single system or distributed across multiple systems. Distributed components can operate sequentially or in parallel.
While the present subject matter has been described in detail with respect to various specific example embodiments thereof, each example is provided by way of explanation, not limitation of the disclosure. Those skilled in the art, upon attaining an understanding of the foregoing, can readily produce alterations to, variations of, and equivalents to such embodiments. Accordingly, the subject disclosure does not preclude inclusion of such modifications, variations and/or additions to the present subject matter as would be readily apparent to one of ordinary skill in the art. For instance, features illustrated or described as part of one embodiment can be used with another embodiment to yield a still further embodiment. Thus, it is intended that the present disclosure cover such alterations, variations, and equivalents.
This application claims priority to and the benefit of each of U.S. Provisional Patent Application No. 63/086,927 filed Oct. 2, 2020 and U.S. Provisional Patent Application No. 63/115,874 filed Nov. 19, 2020. Both of U.S. Provisional Patent Application No. 63/086,927 and U.S. Provisional Patent Application No. 63/115,874 are hereby incorporated by reference in their entirety for all purposes.
Number | Date | Country | |
---|---|---|---|
63115874 | Nov 2020 | US | |
63086927 | Oct 2020 | US |