Gather round, Twitter folks, it's time for our beloved
**Alice's adventures in a differentiable wonderland**, our magical tour of autodiff and backpropagation. π₯
Slides below 1/n π
It all started from her belief that "very few things indeed were really impossible". Could AI truly be below the corner? Could differentiability be the only ingredient that was needed?
2/n
Wondering were to start, Alice discovered a paper by pioneer @ylecun promising "a path towards autonomous intelligent agents".
Intelligence would arise, it was argued, by several interacting modules, were everything was assumed to be *differentiable*.
3/n
Alice reasoned that differentiability was, indeed, the only thing that could make sense of the explosion of deep learning architectures, from Transformers to neural computers and implicit layers.
4/n
It was time, then, to learn a bit about differentiability and gradient descent. This made sense, as the Cat told her that "if you don't care where you are going, it does not matter which way you go".
5/n
Alice fell through the looking glass in a strange world made of gradient, Jacobians, VJPs, and other mythical creatures. It was not so hard as it appeared at the beginning, though.
6/n
She learned about function composition, automatic differentiation, and the difference between forward-mode (left-to-right) and reverse-mode (right-to-left) differentiation.
7/n
"But wait!", the Dodo told her. "The best way to explain is to do it."
So Alice set out to build her own autodiff system.
8/n
She first started by learning more about the anatomy of a deep learning framework: primitives, JVPs, dispatchers and schedulers.
The core of an autodiff system turned out to be easier than expected, and she ended up re-implementing a simple PyTorch-like API.
Not fully working, but enough to get a glimpse of its functioning. At that moment, she felt like she was getting the hang of this wonderland.
11/n
Alice also learned about object-oriented vs. functional frameworks, and thanks to @sjmielke and her tutorials, she learned how to purify one code to move from one side to the other.
12/n
"Curioser and curioser!" cried Alice, as she moved to more advanced topics while simultaneously loosing her grasp on English.
13/n
You can also differentiate through an implicitly defined layer! She wondered in puzzlement while exploring the tutorial of @zicokolter, @DavidDuvenaud, @SingularMattrix and understanding that this was, indeed, a stranger land than anything she expected.
14/n
Exhausted, she finally got home. Did she learned anything useful? Was she indeed closer to AI? βTut, tut, child!β said the Duchess. βEverythingβs got a moral, if only you can find it.β
A new method to sample structured objects (eg, graphs, sets) with a formulation inspired to the state space of reinforcement learning.
I have collected a few key ideas and pointers below if you are interested. π
1/n
π
*Flow Network based Generative Models for Non-Iterative Diverse Candidate Generation* #NeurIPS paper by @folinoid@JainMoksh et al. introducing the method.
The task is learning to sample objects that can be built 1 piece at a time ("lego-style").
To a practical course, a practical exam: I asked each student to include a new branch in the repository showcasing additional tools and libraries.
The result? *Everyone* loves some hyper-parameter optimization. π
/n
Thanks to their work, you'll find practical examples of fine-tuning parameters using @OptunaAutoML, AX (from @facebookai), @raydistributed Tune, and Auto-PyTorch and Talos coming soon.
An emerging approach in generative modelling that is gathering more and more attention.
If you are interested, I collected some introductive material and thoughts in a small thread. π
Feel free to weigh in with additional material!
/n
An amazing property of diffusion models is simplicity.
You define a probabilistic chain that gradually "noise" the input image until only white noise remains.
Then, generation is done by learning to reverse this chain. In many cases, the two directions have similar form.
/n
The starting point for diffusion models is probably "Deep Unsupervised Learning using Nonequilibrium Thermodynamics" by @jaschasd Weiss @niru_m@SuryaGanguli
*LocoProp: Enhancing BackProp via Local Loss Optimization*
by @esiamid@_arohan_ & Warmuth
Interesting approach to bridge the gap between first-order, second-order, and "local" optimization approaches. π
/n
The key idea is to use a single GD step to define auxiliary local targets for each layer, either at the level of pre- or post-activations.
Then, optimization is done by solving local "matching" problems wrt these new variables.
/n
What is intriguing is that the framework interpolates between multiple scenarios: first solution step is the original GD, while closed-form solution (in one case) is similar to a pre-conditioned GD model. Optimization is "local" in the sense that it decouples across layers.