Giter VIP home page Giter VIP logo

Comments (2)

romanngg avatar romanngg commented on August 17, 2024

NNG and NTK give you the full posterior distribution on the test set (mean and full, non-isotropic covariance), check out these functions:

https://neural-tangents.readthedocs.io/en/latest/_autosummary/neural_tangents.predict.gp_inference.html#neural_tangents.predict.gp_inference

https://neural-tangents.readthedocs.io/en/latest/_autosummary/neural_tangents.predict.gradient_descent_mse_ensemble.html#neural_tangents.predict.gradient_descent_mse_ensemble

These correspond to equations from 13 to 16 in https://arxiv.org/pdf/1902.06720.pdf

We also use these to plot uncertainties on the outputs in the cookbok https://colab.sandbox.google.com/github/google/neural-tangents/blob/main/notebooks/neural_tangents_cookbook.ipynb

With some math from uncertainties on the outputs you can also derive the uncertainties on the MSE loss as we do in Figure 1 of https://arxiv.org/pdf/1912.02803.pdf

Lmk if this helps!

from neural-tangents.

bangxiangyong avatar bangxiangyong commented on August 17, 2024

Thanks for the reply!

I may be limited by knowledge; but wouldn't an MSE ensembled loss only capture epistemic uncertainty i.e. uncertainty about the possible models instead of uncertainty within the data?

I have knowledge about Bayesian neural networks (BNN) and am trying to draw the parallel to NNGP/NTK inferences when it comes to estimating the aleatoric uncertainty and was expecting something along the lines of training under NLL of Gaussian loss (instead of MSE). To estimate aleatoric uncertainty the BNN architecture has dual outputs in the heteroscedestic setup (one for mean and one for variance of the Gaussian); whereas in the homoscedestic setup a free parameter is used for estimating the Gaussian variance. I guess one approach would be modifying the loss function of the NNGP to a Gaussian NLL (instead of MSE); However, i fail to find an example that does so. For references on estimating aleatoric uncertainty I am referring to setups such as the ones below:

https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0252108
(Equation 12)

https://proceedings.neurips.cc/paper_files/paper/2017/file/2650d6089a6d640c5e85b2b88265dc2b-Paper.pdf
(Equation 5)

I hope i am making some sense!..

from neural-tangents.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.