|
51 | 51 | ], |
52 | 52 | "authors": [ |
53 | 53 |
|
| 54 | + { |
| 55 | + "author": "" |
| 56 | + }, |
| 57 | + |
| 58 | + { |
| 59 | + "author": "" |
| 60 | + }, |
| 61 | + |
| 62 | + { |
| 63 | + "author": "" |
| 64 | + }, |
| 65 | + |
54 | 66 | { |
55 | 67 | "author": "" |
56 | 68 | } |
@@ -140,7 +152,75 @@ <h1>Lecture 17</h1> |
140 | 152 |
|
141 | 153 | <d-byline></d-byline> |
142 | 154 |
|
143 | | - <d-article> <h2 id="overview">Overview</h2> |
| 155 | + <d-article> <h2 id="november-3--generative-adversarial-networks-gans">November 3 — Generative Adversarial Networks (GANs)</h2> |
| 156 | + |
| 157 | +<h3 id="topics">Topics</h3> |
| 158 | + |
| 159 | +<ol> |
| 160 | + <li>Review: Autoencoders</li> |
| 161 | + <li>Generative Adversarial Networks (GANs)</li> |
| 162 | + <li>GANs and VAEs: A Unified View</li> |
| 163 | +</ol> |
| 164 | + |
| 165 | +<hr /> |
| 166 | + |
| 167 | +<h2 id="1-autoencoders-review">1. Autoencoders (Review)</h2> |
| 168 | + |
| 169 | +<p><strong>Goal:</strong> Learn a compressed latent representation of input ( x ).</p> |
| 170 | + |
| 171 | +<p><strong>Structure:</strong> |
| 172 | +$ |
| 173 | +\hat{x} = f(h) = f(g(x)) |
| 174 | +$ |
| 175 | +where:</p> |
| 176 | + |
| 177 | +<ul> |
| 178 | + <li>( $g$ ): encoder</li> |
| 179 | + <li>( $f$ ): decoder</li> |
| 180 | +</ul> |
| 181 | + |
| 182 | +<h3 id="variants">Variants</h3> |
| 183 | + |
| 184 | +<h4 id="denoising-autoencoders">Denoising Autoencoders</h4> |
| 185 | + |
| 186 | +<ul> |
| 187 | + <li>Add noise (e.g., dropout or Gaussian noise) to input.</li> |
| 188 | + <li>Train to reconstruct the original, uncorrupted input.</li> |
| 189 | + <li>Purpose: Learn robust representations that can remove noise.</li> |
| 190 | +</ul> |
| 191 | + |
| 192 | +<h4 id="autoencoders-with-dropout">Autoencoders with Dropout</h4> |
| 193 | + |
| 194 | +<ul> |
| 195 | + <li>Dropout layers encourage redundancy in learned features.</li> |
| 196 | + <li>Improves generalization and robustness to missing inputs.</li> |
| 197 | +</ul> |
| 198 | + |
| 199 | +<h4 id="sparse-autoencoders">Sparse Autoencoders</h4> |
| 200 | + |
| 201 | +<ul> |
| 202 | + <li> |
| 203 | + <p>Loss function: |
| 204 | +$ |
| 205 | +L = \lVert x - \hat{x} \rVert^2 + \lambda \sum_i |h_i| |
| 206 | +$</p> |
| 207 | + </li> |
| 208 | + <li>Adds an L1 penalty on activations to enforce sparsity.</li> |
| 209 | + <li>Produces interpretable features — each neuron learns a distinct factor.</li> |
| 210 | +</ul> |
| 211 | + |
| 212 | +<h4 id="variational-autoencoders-vaes">Variational Autoencoders (VAEs)</h4> |
| 213 | + |
| 214 | +<ul> |
| 215 | + <li>Latent variable ( $z \sim \mathcal{N}(0, I)$ )</li> |
| 216 | + <li>Enables sampling new data points.</li> |
| 217 | + <li>Provides a probabilistic framework for generative modeling.</li> |
| 218 | +</ul> |
| 219 | + |
| 220 | +<hr /> |
| 221 | +<h2 id="2-generative-adversarial-networks-gans">2. Generative Adversarial Networks (GANs)</h2> |
| 222 | + |
| 223 | +<h2 id="overview">Overview</h2> |
144 | 224 |
|
145 | 225 | <p>Generative Adversarial Networks (GANs) were introduced by Goodfellow et al. (2014), and is a generative modeling framework between a <strong>generator</strong> that produces synthetic samples and a <strong>discriminator</strong> that tries to distinguish them from real data. Unlike autoencoders or autoregressive models, GANs can generate an entire sample with less steps.</p> |
146 | 226 |
|
@@ -223,7 +303,54 @@ <h3 id="deep-convolutional-gan-dc-gan">Deep Convolutional GAN (DC-GAN)</h3> |
223 | 303 |
|
224 | 304 | <hr /> |
225 | 305 |
|
226 | | -<h2 id="gans-vs-vaes-and-variational-em-view">GANs vs VAEs and Variational-EM View</h2> |
| 306 | +<h2 id="3-gans-and-vaes-a-unified-view">3. GANs and VAEs: A Unified View</h2> |
| 307 | + |
| 308 | +<h3 id="a-unified-view">A Unified View</h3> |
| 309 | + |
| 310 | +<table> |
| 311 | + <thead> |
| 312 | + <tr> |
| 313 | + <th>Feature</th> |
| 314 | + <th>Autoencoders (AEs)</th> |
| 315 | + <th>Variational Autoencoders (VAEs)</th> |
| 316 | + <th>GANs</th> |
| 317 | + </tr> |
| 318 | + </thead> |
| 319 | + <tbody> |
| 320 | + <tr> |
| 321 | + <td>Goal</td> |
| 322 | + <td>Learn latent representations</td> |
| 323 | + <td>Probabilistic generative model</td> |
| 324 | + <td>Adversarial generative model</td> |
| 325 | + </tr> |
| 326 | + <tr> |
| 327 | + <td>Latent Variable</td> |
| 328 | + <td>Deterministic ( $h = g(x)$ )</td> |
| 329 | + <td>( $z \sim \mathcal{N}(0, I)$ )</td> |
| 330 | + <td>( $z \sim p_z(z)$ )</td> |
| 331 | + </tr> |
| 332 | + <tr> |
| 333 | + <td>Training</td> |
| 334 | + <td>Reconstruction loss</td> |
| 335 | + <td>ELBO (KL + reconstruction)</td> |
| 336 | + <td>Adversarial minimax loss</td> |
| 337 | + </tr> |
| 338 | + <tr> |
| 339 | + <td>Sampling</td> |
| 340 | + <td>Deterministic decode</td> |
| 341 | + <td>Random sampling via latent prior</td> |
| 342 | + <td>Generator sampling ( G(z) )</td> |
| 343 | + </tr> |
| 344 | + <tr> |
| 345 | + <td>Weakness</td> |
| 346 | + <td>Not generative</td> |
| 347 | + <td>Blurry outputs</td> |
| 348 | + <td>Instability in training</td> |
| 349 | + </tr> |
| 350 | + </tbody> |
| 351 | +</table> |
| 352 | + |
| 353 | +<h3 id="vaes-vs-gans-a-cloesup">VAEs vs. GANs: a cloesup</h3> |
227 | 354 |
|
228 | 355 | <table> |
229 | 356 | <thead> |
|
0 commit comments