-
Notifications
You must be signed in to change notification settings - Fork 0
/
presentation.tex
403 lines (291 loc) · 22.2 KB
/
presentation.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
\documentclass{beamer}
% Set theme and colors
\usetheme{metropolis}
\useoutertheme{metropolis}
\useinnertheme{metropolis}
\usefonttheme{metropolis}
\usecolortheme[snowy]{owl}
% Load packages
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{helvet}
\usepackage[beamer,customcolors]{hf-tikz}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{mathrsfs}
\usepackage{bm}
% math packages
\usepackage{amsmath,amsfonts}
\usepackage{bigints}
% beamer settings
\setbeamercovered{transparent}
\setbeamertemplate{blocks}[rounded][shadow=false]
\setbeamercolor{block title}{use=structure,fg=white,bg=red!75!black}
\setbeamercolor{block body}{use=structure,fg=black,bg=red!20!white}
% tikz libs
\usetikzlibrary{positioning}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{arrows}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{patterns,decorations.pathreplacing}
\usetikzlibrary{fit}
\usetikzlibrary{backgrounds}
\usetikzlibrary{shapes,backgrounds,calc}
\newsavebox{\genericfilt}
\savebox{\genericfilt}{%
\begin{tikzpicture}[font=\small, >=stealth,yscale=0.15,xscale=0.1]
% define normal distribution function 'normaltwo'
\def\normaltwo{\x,{exp((-(\x)^2)/0.5)}}
\draw[line width=0.25mm,domain=-1.7:1.7] plot (\normaltwo);
\end{tikzpicture}%
}
\tikzset{
diagonal fill/.style 2 args={fill=#2, path picture={
\fill[#1, sharp corners] (path picture bounding box.south west) -|
(path picture bounding box.north east) -- cycle;}},
reversed diagonal fill/.style 2 args={fill=#2, path picture={
\fill[#1, sharp corners] (path picture bounding box.north west) |-
(path picture bounding box.south east) -- cycle;}}
}
\tikzset{
onslide/.code args={<#1>#2}{%
\only<#1>{\pgfkeysalso{#2}}%
}
}
% Some SPN definitions...
\newcommand{\SPT}{\mathcal{T}}
\newcommand{\SPN}{\mathcal{S}}
\newcommand{\graph}{\mathcal{G}}
\newcommand{\scope}{\psi}
\newcommand{\ProductNode}{\mathsf{P}}
\newcommand{\ProductNodes}{\bm{\mathsf{P}}}
\newcommand{\SumNode}{\mathsf{S}}
\newcommand{\SumNodes}{\bm{\mathsf{S}}}
\newcommand{\Leaf}{\mathsf{L}}
\newcommand{\Leaves}{\bm{\mathsf{L}}}
\newcommand{\Node}{\mathsf{N}}
\newcommand{\Nodes}{\bm{\mathsf{N}}}
\newcommand{\Child}{\mathsf{C}}
\newcommand{\Region}{\ensuremath{R}}
\newcommand{\Partition}{\ensuremath{P}}
\newcommand{\Regions}{\ensuremath{\bm{R}}}
\newcommand{\Partitions}{\ensuremath{\bm{P}}}
\newcommand{\RG}{\ensuremath{\mathcal{R}}}
\newcommand{\X}{\bm{X}}
\newcommand{\ch}{\ensuremath{\bm{ch}}}
\newcommand{\anc}{\ensuremath{\bm{anc}}}
\newcommand{\powerSet}[1]{\mathscr{P}(#1)} % power set
\newcommand{\cbar}{\;|\;}
\begin{document}
\begin{frame}{Sum-Product Networks}
\begin{block}{Sum-Product Networks (SPNs)}
A sum-product network [Poon \& Domingos 2011] over random variables $\X$ is a tuple $\SPN = (\graph, \scope, \bm{w}, \theta)$, consisting of a \emph{computational graph} $\graph$, a \emph{scope-function} $\scope$ [Trapp et al. 2019], network weights $\bm{w}$ and leaf node parameters $\theta$.
\end{block}
%\\[2em]
Why use SPNs? \emph{\textbf{Exact and efficient}} computation of many probabilistic inference tasks, e.g.~marginalisation.
SPNs are deep structured mixture models, generalising shallow mixtures, using an architecture that is a special type of a sparse \emph{linear} neural network with non-linear inputs.
Every SPN is a multi-linear function in its weights.
\end{frame}
\begin{frame}{Computational Graph: $\graph$}
\scalebox{0.9}{
\begin{tikzpicture}[>=latex, minimum size=6mm, inner sep=0pt, align=center]
% nodes
\node[draw, thick, circle, onslide=<2-3>{opacity=0.2}, onslide=<4->{opacity=1}, onslide=<4>{label=right:{$\;\;\SumNode(\bm{x})=\sum_{\Node \in \ch{\SumNode}} w_{\SumNode,\Node} \Node(\bm{x}) \;\;\;\; (w_{\SumNode,\Node} \geq 0)$}}] (s1) {\large$+$};
\node[draw, thick, circle, onslide=<2-3>{opacity=0.2}, onslide=<4->{opacity=1}] (p1) [below left = 20pt and 40pt of s1] {\large$\times$};
\node[draw, thick, circle, onslide=<2>{opacity=0.2}, onslide=<3->{opacity=1}, onslide=<3>{label=right:{$\;\;\ProductNode(\bm{x})=\prod_{\Node \in \ch(\ProductNode)} \Node(\bm{x})$}}] (p2) [below right = 20pt and 40pt of s1] {\large$\times$};
\node[draw, thick, circle, onslide=<2-3>{opacity=0.2}, onslide=<4->{opacity=1}] (s2) [below right = 20pt and 15pt of p1] {\large$+$};
\node[draw, thick, circle, onslide=<2>{opacity=0.2}, onslide=<3->{opacity=1}] (s3) [below left = 20pt and 15pt of p2] {\large$+$};
\node[draw, thick, circle, onslide=<2-3>{opacity=0.2}, onslide=<4->{opacity=1}] (p3) [below left = 20pt and 20pt of s2] {\large$\times$};
\node[draw, thick, circle, onslide=<2-3>{opacity=0.2}, onslide=<4->{opacity=1}] (p4) [below right = 20pt and 0pt of s2] {\large$\times$};
\node[draw, thick, circle, onslide=<2>{opacity=0.2}, onslide=<3->{opacity=1}] (p5) [below right = 20pt and 0pt of s3] {\large$\times$};
\node[draw, thick, circle, onslide=<2-3>{opacity=0.2}, onslide=<4->{opacity=1}] (s4) [below left = 20pt and 10pt of p3] {\large$+$};
\node[draw, thick, circle, onslide=<2>{opacity=0.2}, onslide=<3->{opacity=1}] (s5) [below right = 20pt and 0pt of p4] {\large$+$};
\node[draw, thick, circle, onslide=<2>{opacity=0.2}, onslide=<3->{opacity=1}] (s6) [below right = 20pt and 20pt of p5] {\large$+$};
\node[draw, thick, circle, onslide=<2-3>{opacity=0.2}, onslide=<4->{opacity=1}] (l1) [below left = 20pt and 20pt of p1] {\usebox{\genericfilt}};
\node[draw, thick, circle, onslide=<2>{label=right:{$\;\;\Leaf(\bm{x}) = p(\bm{x}_\Leaf \cbar \theta_\Leaf)$}}] (l6) [below right = 20pt and 20pt of p2] {\usebox{\genericfilt}};
\node[draw, thick, circle, onslide=<2-3>{opacity=0.2}, onslide=<4->{opacity=1}] (l2) [below left = 20pt and 5pt of s4] {\usebox{\genericfilt}};
\node[draw, thick, circle, onslide=<2-3>{opacity=0.2}, onslide=<4->{opacity=1}] (l3) [below right = 20pt and 5pt of s4] {\usebox{\genericfilt}};
\node[draw, thick, circle, onslide=<2>{opacity=0.2}, onslide=<3->{opacity=1}] (l4) [below left = 20pt and 5pt of s5] {\usebox{\genericfilt}};
\node[draw, thick, circle, onslide=<2>{opacity=0.2}, onslide=<3->{opacity=1}] (l5) [below right = 20pt and 5pt of s5] {\usebox{\genericfilt}};
\node[draw, thick, circle, onslide=<2>{opacity=0.2}, onslide=<3->{opacity=1}] (l7) [below left = 20pt and 5pt of s6] {\usebox{\genericfilt}};
\node[draw, thick, circle, onslide=<2>{opacity=0.2}, onslide=<3->{opacity=1}] (l8) [below right = 20pt and 5pt of s6] {\usebox{\genericfilt}};
% edges
\draw [->, onslide=<2-3>{opacity=0.2}] (s1) -- (p1);
\draw [->, onslide=<2-3>{opacity=0.2}] (s1) -- (p2);
\draw [->, onslide=<2-3>{opacity=0.2}] (p1) -- (l1);
\draw [->, onslide=<2-3>{opacity=0.2}] (p1) -- (s2);
\draw [->, onslide=<2>{opacity=0.2}] (p2) -- (s3);
\draw [->, onslide=<2-3>{opacity=0.2}] (s2) -- (p3);
\draw [->, onslide=<2-3>{opacity=0.2}] (s2) -- (p4);
\draw [->, onslide=<2>{opacity=0.2}] (s3) -- (p5);
\draw [->, onslide=<2-3>{opacity=0.2}] (p3) -- (s4);
\draw [->, onslide=<2-3>{opacity=0.2}] (p3) -- (s5);
\draw [->, onslide=<2-3>{opacity=0.2}] (p4) -- (s5);
\draw [->, onslide=<2-3>{opacity=0.2}] (p4) -- (l3);
\draw [->, onslide=<2-3>{opacity=0.2}] (s4) -- (l2);
\draw [->, onslide=<2-3>{opacity=0.2}] (s4) -- (l3);
\draw [->, onslide=<2>{opacity=0.2}] (s5) -- (l4);
\draw [->, onslide=<2>{opacity=0.2}] (s5) -- (l5);
\draw [->, onslide=<2>{opacity=0.2}] (p5) -- (s5);
\draw [->, onslide=<2>{opacity=0.2}] (p5) -- (s6);
\draw [->, onslide=<2>{opacity=0.2}] (p2) -- (l6);
\draw [->, onslide=<2>{opacity=0.2}] (s6) -- (l7);
\draw [->, onslide=<2>{opacity=0.2}] (s6) -- (l8);
\end{tikzpicture}
}
\end{frame}
\begin{frame}{Scope Function: $\scope \colon \Nodes \mapsto \powerSet{\X}$}
\scalebox{0.9}{
\begin{tikzpicture}[>=latex, minimum size=6mm, inner sep=0pt, align=center]
% nodes
\node[draw, onslide=<3->{draw=black!75, fill=gray!20, label=right:{$\{X_1,X_2,X_3\}$}}, thick, circle] (s1) {\large$+$};
\node[draw, onslide=<3->{draw=black!75, fill=gray!20}, thick, circle] (p1) [below left = 20pt and 40pt of s1] {\large$\times$};
\node[draw, onslide=<3->{draw=black!75, fill=gray!20, label=right:{$\{X_1,X_2,X_3\}$}}, thick, circle] (p2) [below right = 20pt and 40pt of s1] {\large$\times$};
\node[draw, onslide=<3->{draw=black!75, diagonal fill={blue!20}{purple!20}}, thick, circle] (s2) [below right = 20pt and 15pt of p1] {\large$+$};
\node[draw, onslide=<3->{draw=black!75, diagonal fill={orange!20}{blue!20}}, thick, circle] (s3) [below left = 20pt and 15pt of p2] {\large$+$};
\node[draw, onslide=<2->{draw=black!75, diagonal fill={blue!20}{purple!20}}, thick, circle] (p3) [below left = 20pt and 20pt of s2] {\large$\times$};
\node[draw, onslide=<2->{draw=black!75, diagonal fill={blue!20}{purple!20}}, thick, circle] (p4) [below right = 20pt and 0pt of s2] {\large$\times$};
\node[draw, onslide=<2->{draw=black!75, diagonal fill={orange!20}{blue!20}, label=right:{$\{X_2, X_3\}$}}, thick, circle] (p5) [below right = 20pt and 0pt of s3] {\large$\times$};
\node [onslide=<2->{opacity=0}] (rotatetext1) [below right = 20pt and 100pt of s3] {completeness / \\ smoothness};
\node [onslide=<1>{opacity=0}, onslide=<3->{opacity=0}] (rotatetext2) [below right = 20pt and 100pt of s3] {decomposability};
\node[draw=purple!75, fill=purple!20, label=right:{$\{X_3\}$}, thick, circle] (s4) [below left = 20pt and 10pt of p3] {\large$+$};
\node[draw=blue!75, fill=blue!20, label=right:{$\{X_2\}$}, thick, circle] (s5) [below right = 20pt and 0pt of p4] {\large$+$};
\node[draw=orange!75, fill=orange!20, label=right:{$\{X_1\}$}, thick, circle] (s6) [below right = 20pt and 20pt of p5] {\large$+$};
\node[draw, thick, circle, onslide=<3->{draw=orange!75, fill=orange!20}] (l1) [below left = 20pt and 20pt of p1] {\usebox{\genericfilt}};
\node[draw, thick, circle, onslide=<3->{draw=purple!75, fill=purple!20, label=right:{$\{X_2\}$}}] (l6) [below right = 20pt and 20pt of p2] {\usebox{\genericfilt}};
\node[draw=purple!75, fill=purple!20, thick, circle, label=below:{$\{X_2\}$}] (l2) [below left = 20pt and 5pt of s4] {\usebox{\genericfilt}};
\node[draw=purple!75, fill=purple!20, thick, circle, label=below:{$\{X_2\}$}] (l3) [below right = 20pt and 5pt of s4] {\usebox{\genericfilt}};
\node[draw=blue!75, fill=blue!20, thick, circle, label=below:{$\{X_3\}$}] (l4) [below left = 20pt and 5pt of s5] {\usebox{\genericfilt}};
\node[draw=blue!75, fill=blue!20, thick, circle, label=below:{$\{X_3\}$}] (l5) [below right = 20pt and 5pt of s5] {\usebox{\genericfilt}};
\node[draw=orange!75, fill=orange!20, thick, circle, label=below:{$\{X_1\}$}] (l7) [below left = 20pt and 5pt of s6] {\usebox{\genericfilt}};
\node[draw=orange!75, fill=orange!20, thick, circle, label=below:{$\{X_1\}$}] (l8) [below right = 20pt and 5pt of s6] {\usebox{\genericfilt}};
% edges
\draw [->] (s1) -- (p1);
\draw [->] (s1) -- (p2);
\draw [->] (p1) -- (l1);
\draw [->] (p1) -- (s2);
\draw [->] (p2) -- (s3);
\draw [->] (s2) -- (p3);
\draw [->] (s2) -- (p4);
\draw [->] (s3) -- (p5);
\draw [->] (p3) -- (s4);
\draw [->] (p3) -- (s5);
\draw [->] (p4) -- (s5);
\draw [->] (p4) -- (l3);
\draw [->] (s4) -- (l2);
\draw [->] (s4) -- (l3);
\draw [->] (s5) -- (l4);
\draw [->] (s5) -- (l5);
\draw [->] (p5) -- (s5);
\draw [->] (p5) -- (s6);
\draw [->] (p2) -- (l6);
\draw [->] (s6) -- (l7);
\draw [->] (s6) -- (l8);
\end{tikzpicture}
}
\end{frame}
\begin{frame}{SPNs as a Mixture of Induced Trees}
\scalebox{0.9}{
\begin{tikzpicture}[>=latex, minimum size=6mm, inner sep=0pt, align=center]
% nodes
\node[draw=black!75, fill=gray!20, label=right:{$\color{gray!50}\{X_1,X_2,X_3\}$}, thick, circle, label=left:{$Z_{\SumNode_1} = 1\,$}] (s1) {\large$+$};
\node[draw=black!75, fill=gray!20, thick, circle] (p1) [below left = 20pt and 40pt of s1] {\large$\times$};
\node[draw=black!75, fill=gray!20, label=right:{$\color{gray!50}\{X_1,X_2,X_3\}$}, thick, circle, opacity=0.2] (p2) [below right = 20pt and 40pt of s1] {\large$\times$};
\node[draw=black!75, diagonal fill={blue!20}{purple!20}, thick, circle, onslide=<1>{label=left:{$Z_{\SumNode_2} = 1\,$}}, onslide=<2>{label=left:{$Z_\SumNode = 2\;$}}] (s2) [below right = 20pt and 15pt of p1] {\large$+$};
\node[draw=black!75, diagonal fill={orange!20}{blue!20}, thick, circle, opacity=0.2] (s3) [below left = 20pt and 15pt of p2] {\large$+$};
\node[draw=black!75, diagonal fill={blue!20}{purple!20}, thick, circle, onslide=<2>{opacity=0.2}] (p3) [below left = 20pt and 20pt of s2] {\large$\times$};
\node[draw=black!75, diagonal fill={blue!20}{purple!20}, thick, circle, onslide=<1>{opacity=0.2}] (p4) [below right = 20pt and 0pt of s2] {\large$\times$};
\node[draw=black!75, diagonal fill={orange!20}{blue!20}, label=right:{$\color{gray!50}\{X_2, X_3\}$}, thick, circle, opacity=0.2] (p5) [below right = 20pt and 0pt of s3] {\large$\times$};
\node[draw=purple!75, fill=purple!20, label=right:{$\color{gray!50}\{X_3\}$}, thick, circle, onslide=<1>{label=left:{$Z_{\SumNode_4} = 2\,$}}, onslide=<2>{opacity=0.2}] (s4) [below left = 20pt and 10pt of p3] {\large$+$};
\node[draw=blue!75, fill=blue!20, label=left:{$\color{gray!50}\{X_2\}$}, thick, circle, onslide=<1>{label=right:{$\,Z_{\SumNode_5} = 1$}}, onslide=<2>{label=right:{$\,Z_{\SumNode_5} = 2$}}] (s5) [below right = 20pt and 0pt of p4] {\large$+$};
\node[draw=orange!75, fill=orange!20, label=right:{$\color{gray!50}\{X_1\}$}, thick, circle, opacity=0.2] (s6) [below right = 20pt and 20pt of p5] {\large$+$};
\node[thick, circle, draw=orange!75, fill=orange!20] (l1) [below left = 20pt and 20pt of p1] {\usebox{\genericfilt}};
\node[thick, circle, draw=purple!75, fill=purple!20, label=right:{$\color{gray!50}\{X_2\}$}, opacity=0.2] (l6) [below right = 20pt and 20pt of p2] {\usebox{\genericfilt}};
\node[draw=purple!75, fill=purple!20, thick, circle, label=below:{$\color{gray!50}\{X_2\}$}, opacity=0.2] (l2) [below left = 20pt and 5pt of s4] {\usebox{\genericfilt}};
\node[draw=purple!75, fill=purple!20, thick, circle, label=below:{$\color{gray!50}\{X_2\}$}] (l3) [below right = 20pt and 5pt of s4] {\usebox{\genericfilt}};
\node[draw=blue!75, fill=blue!20, thick, circle, label=below:{$\color{gray!50}\{X_3\}$}, onslide=<2>{opacity=0.2}] (l4) [below left = 20pt and 5pt of s5] {\usebox{\genericfilt}};
\node[draw=blue!75, fill=blue!20, thick, circle, label=below:{$\color{gray!50}\{X_3\}$}, onslide=<1>{opacity=0.2}] (l5) [below right = 20pt and 5pt of s5] {\usebox{\genericfilt}};
\node[draw=orange!75, fill=orange!20, thick, circle, label=below:{$\color{gray!50}\{X_1\}$}, opacity=0.2] (l7) [below left = 20pt and 5pt of s6] {\usebox{\genericfilt}};
\node[draw=orange!75, fill=orange!20, thick, circle, label=below:{$\color{gray!50}\{X_1\}$}, opacity=0.2] (l8) [below right = 20pt and 5pt of s6] {\usebox{\genericfilt}};
% edges
\draw [->] (s1) -- (p1);
\draw [->, opacity=0.2] (s1) -- (p2);
\draw [->] (p1) -- (l1);
\draw [->] (p1) -- (s2);
\draw [->, opacity=0.2] (p2) -- (s3);
\draw [->, onslide=<2>{opacity=0.2}] (s2) -- (p3);
\draw [->, onslide=<1>{opacity=0.2}] (s2) -- (p4);
\draw [->, opacity=0.2] (s3) -- (p5);
\draw [->, onslide=<2>{opacity=0.2}] (p3) -- (s4);
\draw [->, onslide=<2>{opacity=0.2}] (p3) -- (s5);
\draw [->, onslide=<1>{opacity=0.2}] (p4) -- (s5);
\draw [->, onslide=<1>{opacity=0.2}] (p4) -- (l3);
\draw [->, opacity=0.2] (s4) -- (l2);
\draw [->, onslide=<2>{opacity=0.2}] (s4) -- (l3);
\draw [->, onslide=<2>{opacity=0.2}] (s5) -- (l4);
\draw [->, onslide=<1>{opacity=0.2}] (s5) -- (l5);
\draw [->, opacity=0.2] (p5) -- (s5);
\draw [->, opacity=0.2] (p5) -- (s6);
\draw [->, opacity=0.2] (p2) -- (l6);
\draw [->, opacity=0.2] (s6) -- (l7);
\draw [->, opacity=0.2] (s6) -- (l8);
\end{tikzpicture}
}
\begin{equation}
\SPN(\bm{x}) = \sum_{i=1}^K \prod_{(\SumNode,\Node) \in \SPT_{i,E}} w_{\SumNode,\Node} \prod_{\Leaf \in \SPT_{i,V}} p(\bm{x}_\Leaf \cbar \theta_\Leaf)
\end{equation}
\end{frame}
\begin{frame}{Exact Marginalisation in SPNs}
\scalebox{0.9}{
\begin{tikzpicture}[>=latex, minimum size=6mm, inner sep=0pt, align=center]
% nodes
\node[draw=black!75, fill=gray!20, label=right:{$\color{gray}\{X_1,X_2,X_3\}$}, onslide=<1>{label=left:{$\color{orange!75}\bigintsss\!\color{purple!75}\bigintsss\!\color{blue!75}\bigintsss\;$}}, thick, circle] (s1) {\large$+$};
\node[draw=black!75, fill=gray!20, thick, circle, onslide=<2>{label=left:{$\color{orange!75}\bigintsss\!\color{purple!75}\bigintsss\!\color{blue!75}\bigintsss\;$}}] (p1) [below left = 20pt and 40pt of s1] {\large$\times$};
\node[draw=black!75, fill=gray!20, label=right:{\color{gray}$\{X_1,X_2,X_3\}$}, thick, circle, onslide=<2>{label=left:{$\color{orange!75}\bigintsss\!\color{purple!75}\bigintsss\!\color{blue!75}\bigintsss\;$}}] (p2) [below right = 20pt and 40pt of s1] {\large$\times$};
\node[draw=black!75, diagonal fill={blue!20}{purple!20}, thick, circle, onslide=<3>{label=left:{$\color{purple!75}\bigintsss\!\color{blue!75}\bigintsss\;$}}] (s2) [below right = 20pt and 15pt of p1] {\large$+$};
\node[draw=black!75, diagonal fill={orange!20}{blue!20}, thick, circle, onslide=<3>{label=left:{$\color{orange!75}\bigintsss\!\color{blue!75}\bigintsss\;$}}] (s3) [below left = 20pt and 15pt of p2] {\large$+$};
\node[draw=black!75, diagonal fill={blue!20}{purple!20}, thick, circle, onslide=<4>{label=left:{$\color{purple!75}\bigintsss\!\color{blue!75}\bigintsss\;$}}] (p3) [below left = 20pt and 20pt of s2] {\large$\times$};
\node[draw=black!75, diagonal fill={blue!20}{purple!20}, thick, circle, onslide=<4>{label=left:{$\color{purple!75}\bigintsss\!\color{blue!75}\bigintsss\;$}}] (p4) [below right = 20pt and 0pt of s2] {\large$\times$};
\node[draw=black!75, diagonal fill={orange!20}{blue!20}, label=right:{$\color{gray}\{X_2, X_3\}$}, thick, circle, onslide=<4>{label=left:{$\color{orange!75}\bigintsss\!\color{blue!75}\bigintsss\;$}}] (p5) [below right = 20pt and 0pt of s3] {\large$\times$};
\node[draw=purple!75, fill=purple!20, label=right:{$\color{gray}\{X_3\}$}, thick, circle, onslide=<5>{label=left:{$\color{purple!75}\bigintsss$}} ] (s4) [below left = 20pt and 10pt of p3] {\large$+$};
\node[draw=blue!75, fill=blue!20, label=right:{$\color{gray}\{X_2\}$}, thick, circle, onslide=<5>{label=left:{$\color{blue!75}\bigintsss$}}] (s5) [below right = 20pt and 0pt of p4] {\large$+$};
\node[draw=orange!75, fill=orange!20, label=right:{$\color{gray}\{X_1\}$}, thick, circle, onslide=<5>{label=left:{$\color{orange!75}\bigintsss$}}] (s6) [below right = 20pt and 20pt of p5] {\large$+$};
\node[draw=orange!75, thick, circle, fill=orange!20, onslide=<3->{label=left:{$\color{orange!75}\bigintsss$}}] (l1) [below left = 20pt and 20pt of p1] {\usebox{\genericfilt}};
\node[draw=purple!75, thick, circle, fill=purple!20, label=right:{$\color{gray}\{X_2\}$}, onslide=<3->{label=left:{$\color{purple!75}\bigintsss$}}] (l6) [below right = 20pt and 20pt of p2] {\usebox{\genericfilt}};
\node[draw=purple!75, fill=purple!20, thick, circle, label=below:{$\color{gray}\{X_2\}$}, onslide=<6>{label=left:{$\color{purple!75}\bigintsss$}}] (l2) [below left = 20pt and 5pt of s4] {\usebox{\genericfilt}};
\node[draw=purple!75, fill=purple!20, thick, circle, label=below:{$\color{gray}\{X_2\}$}, onslide=<6>{label=left:{$\color{purple!75}\bigintsss$}}] (l3) [below right = 20pt and 5pt of s4] {\usebox{\genericfilt}};
\node[draw=blue!75, fill=blue!20, thick, circle, label=below:{$\color{gray}\{X_3\}$}, onslide=<6>{label=left:{$\color{blue!75}\bigintsss$}}] (l4) [below left = 20pt and 5pt of s5] {\usebox{\genericfilt}};
\node[draw=blue!75, fill=blue!20, thick, circle, label=below:{$\color{gray}\{X_3\}$}, onslide=<6>{label=left:{$\color{blue!75}\bigintsss$}}] (l5) [below right = 20pt and 5pt of s5] {\usebox{\genericfilt}};
\node[draw=orange!75, fill=orange!20, thick, circle, label=below:{$\color{gray}\{X_1\}$}, onslide=<6>{label=left:{$\color{orange!75}\bigintsss$}}] (l7) [below left = 20pt and 5pt of s6] {\usebox{\genericfilt}};
\node[draw=orange!75, fill=orange!20, thick, circle, label=below:{$\color{gray}\{X_1\}$}, onslide=<6>{label=left:{$\color{orange!75}\bigintsss$}}] (l8) [below right = 20pt and 5pt of s6] {\usebox{\genericfilt}};
% edges
\draw [->] (s1) -- (p1);
\draw [->] (s1) -- (p2);
\draw [->] (p1) -- (l1);
\draw [->] (p1) -- (s2);
\draw [->] (p2) -- (s3);
\draw [->] (s2) -- (p3);
\draw [->] (s2) -- (p4);
\draw [->] (s3) -- (p5);
\draw [->] (p3) -- (s4);
\draw [->] (p3) -- (s5);
\draw [->] (p4) -- (s5);
\draw [->] (p4) -- (l3);
\draw [->] (s4) -- (l2);
\draw [->] (s4) -- (l3);
\draw [->] (s5) -- (l4);
\draw [->] (s5) -- (l5);
\draw [->] (p5) -- (s5);
\draw [->] (p5) -- (s6);
\draw [->] (p2) -- (l6);
\draw [->] (s6) -- (l7);
\draw [->] (s6) -- (l8);
\end{tikzpicture}
}
\end{frame}
\begin{frame}{References}
\scriptsize [Poon \& Domingos 2011] H. Poon and P. M. Domingos, ‘Sum-product networks: A new deep architecture’, UAI 2011, pp. 337–346.
\scriptsize [Trapp et al. 2019] M. Trapp, R. Peharz, H. Ge, F. Pernkopf and Z. Ghahramani, ‘Bayesian learning of sum-product networks’, NeurIPS 2019, pp. 6344–6355.
\end{frame}
\end{document}