masters-thesis

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

README.md (2870B)


      1 Effortless Bayesian Deep Learning: Tapping into the Potential of Modern Optimizers
      2 ==============================
      3 
      4 Bayesian methods allow for estimates of uncertainty which enable more efficient usage of data (i.e., via active learning) and avoid overfitting.
      5 Furthermore, these uncertainty estimates improve model interpretability and assessment of model predictive confidence.
      6 
      7 Currently, approximate Bayesian methods are either expensive to compute (MCMC), are significantly more difficult to implement (such as variational inference), or simply perform poorly and are limited in their Bayesian interpretation (MC dropout).
      8 As such, there is demand for a method which exhibits the same computational cost as the optimization algorithms for deterministic neural networks while providing accurate posterior approximations and working out-of-the-box for any given architecture.
      9 
     10 In this project, we strive to develop an effortless Bayesian method.
     11 More specifically, this project investigates the connections between the Laplace approximation and the approximate second-order derivatives used in modern optimizers, such as Adam.
     12 We use a sampling-based training procedure, where a sample is first drawn from a Gaussian weight-posterior, a gradient step is performed on this sampled neural network, and the variance of the weight-posterior is updated with an approximate Hessian.
     13 Approximating the Hessian is the most time-consuming and painful-to-engineer step of this training procedure.
     14 In this project, we tap into the potential of modern machine learning frameworks to efficiently approximate the Hessian.
     15 
     16 # Setup
     17 
     18 This document is designed to be generated with `latexmk` and cleaned with `latexmk -C`.
     19 You can use either `pdflatex` or `xelatex` to compile the document, though I've used `pdflatex` throughout the process and can't guarantee that `xelatex` will work out of the box.
     20 If you want to use `xelatex`, you should update the `latexmkrc` file to use `xelatex` instead of `pdflatex`.
     21 I highly recommend using VSCode with the LaTeX Workshop extension to compile the document.
     22 I also lightly recommend using the LTeX extension and the stylecheck script to check for common errors, though this is more out of personal preference.
     23 If using the LaTeX Workshop extension, I would add this to your `settings.json` file:
     24 
     25 ```json
     26 {
     27     "latex-workshop.hover.preview.mathjax.extensions": ["boldsymbol"],
     28     "latex-workshop.hover.preview.newcommand.newcommandFile": "mathjax.tex",
     29     "latex-workshop.hover.preview.newcommand.parseTeXFile.enabled": true,
     30     "latex-workshop.latex.clean.method": "cleanCommand",
     31     "latex-workshop.latex.recipe.default": "latexmk (latexmkrc)",
     32     "latex-workshop.latex.tools": [
     33         {
     34             "name": "latexmk_rconly",
     35             "command": "latexmk",
     36             "args": [],
     37             "env": {}
     38         },
     39     ],
     40 }
     41 ```