Variational Inference by Automatic Differentiation in TensorFlow Probability
We find a surrogate posterior by maximizing the Evidence Lower Bound (ELBO). With a proposal distribution, this can be solved by Automatic Differentiation and a gradient-based optimizer. Here are the notes: https://raw.githubusercontent.com/Ceyron/machine-learning-and-simulation/main/english/probabilistic_machine_learning/vi_automatic_differentation_posterior_normal.pdf
Variational Inference can be hard to understand as there are many difficult components involved at the same time. However, if we outsource the tedious parts like taking derivatives etc. it might become easier to understand what is actually going. This is what this video is about: We will use the Automatic Differentiation of TensorFlow (Probability) to fit a surrogate posterior by a gradient-based optimization (e.g., by using the ADAM optimizer).
For this, we have to define the directed graphical model and need to find a way to approximate the Evidence Lower Bound (ELBO). All of it will be intuitively explained in the video, but is easily abstracted by TensorFlow Probability's function called "tfp.vi.fit_surrogate_posterior".
Any questions? I would be happy to answer them in the comment section :)
-------
? : Check out the GitHub Repository of the channel, where I upload all the handwritten notes and source-code files (contributions are very welcome): https://github.com/Ceyron/machine-learning-and-simulation
? : Follow me on LinkedIn or Twitter for updates on the channel and other cool Machine Learning & Simulation stuff: https://www.linkedin.com/in/felix-koehler and https://twitter.com/felix_m_koehler
? : If you want to support my work on the channel, you can become a Patreon here: https://www.patreon.com/MLsim
-------
⚙️ My Gear:
(Below are affiliate links to Amazon. If you decide to purchase the product or something else on Amazon through this link, I earn a small commission.)
- ?️ Microphone: Blue Yeti: https://amzn.to/3NU7OAs
- ⌨️ Logitech TKL Mechanical Keyboard: https://amzn.to/3JhEtwp
- ? Gaomon Drawing Tablet (similar to a WACOM Tablet, but cheaper, works flawlessly under Linux): https://amzn.to/37katmf
- ? Laptop Charger: https://amzn.to/3ja0imP
- ? My Laptop (generally I like the Dell XPS series): https://amzn.to/38xrABL
- ? My Phone: Fairphone 4 (I love the sustainability and repairability aspect of it): https://amzn.to/3Jr4ZmV
If I had to purchase these items again, I would probably change the following:
- ?️ Rode NT: https://amzn.to/3NUIGtw
- ? Framework Laptop (I do not get a commission here, but I love the vision of Framework. It will definitely be my next Ultrabook): https://frame.work
As an Amazon Associate I earn from qualifying purchases.
-------
Timestamps:
00:00 Introduction
01:03 Example problem: Posterior Normal
01:27 Example problem: DGM
03:13 Example problem: Observed Data
03:44 Example problem: seek posterior
04:27 Example problem: True Posterior
06:08 Surrogate Posterior proposal
06:53 Variational Optimization to Vector Optimization
08:13 Plugging in the ELBO
09:02 Access to the log joint
10:00 Changing to minimization
10:28 ELBO based on scalars
10:58 Automatic Differentiation for obtaining gradients
12:25 Gradient-Based optimization
13:31 We know the true posterior
13:57 Approximating the ELBO by sampling
18:19 TFP: Creating a dataset
19:19 TFP: Parameters of True Posterior
21:58 TFP: Defining the log-joint
26:20 TFP: Creating the Surrogate Posterior
28:35 TFP: ELBO and Gradient Tape (Automatic Differentiation)
31:31 TFP: Performing Variational Inference
33:39 TFP: Comparing True and Surrogate Posterior
35:06 Outro
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Variational Inference by Automatic Differentiation in TensorFlow Probability», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.