\[\theta^* = \argmin_\theta \sum_{(x,y) \in \mathcal{D}} l(f_\theta(x), y)\]
Stochastic Gradient Descent: \(\theta \gets \theta - \alpha \, \nabla_\theta\, l (f_\theta(x), y)\)
Multi-Layered Perceptron (MLP)
\(h_i(x) = \sigma(W_i x + b_i)\)
\(\hat{y} = h_3(h_2(h_1(x)))\)
("misnomer" because original perceptron used step function)
In an MDP, for any \(k \geq 0\):
\[P(r_{t+k} \mid \pi, s_t, a_{t-1}, s_{t-1}, \ldots) = P(r_{t+k} \mid \pi, s_t)\text{,}\]
so there is always an optimal policy based on the state.
In a POMDP, there is no systematic way to simplify
\[P(r_{t+k} \mid \pi, o_t, a_{t-1}, o_{t-1}, \ldots)\text{,}\]
so an optimal policy may depend on the entire action-observation history.
A big MLP that takes the entire sequence in generally has too many parameters (and cannot handle variable length input)
Images: Pascanu 2013
Input: \(u_t\)
State/Output: \(x_t\)
Cost: \(\mathcal{E}_t\)
Important papers:
(\(\frac{\partial^+x_k}{\partial \theta}\) is partial with \(x_{k-1}\) held constant)
Generally, informally: If \(\sigma' \in [0,1]\) (e.g. sigmoid), product can become very small, even numerically zero.
Formally, for the linear case (\(\sigma = \text{identity}\))
Input: \(x_t\)
Output: \(h_t\)
Cell state: \(c_t\)
Forget gate
Input Gate
Output Gate
Hochreiter, S. and Schmidhuber, J. (1997). Long Short-Term Memory. 1780, 1735–1780.
By Guillaume Chevalier - File:The_LSTM_Cell.svg, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=109362147
\(f_t\)
\(i_t\)
\(o_t\)
\(\tilde{c}_t\)
By Jeblad - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=66225938
Input: \(x_t\)
Output: \(\hat{y}_t\) (\(h_t\))
Recurrent State: \(h_t\)
Update gate
Reset gate
Fewer parameters than LSTM
Vaswani, Ashish, et al. "Attention is all you need." Advances in neural information processing systems 30 (2017).
Excellent Blog Post: https://dugas.ch/artificial_curiosity/GPT_architecture.html
or
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D. M., Wu, J., Winter, C., … Amodei, D. (2020). Language models are few-shot learners. Advances in Neural Information Processing Systems, 2020-December.
Chen, L., Lu, K., Rajeswaran, A., Lee, K., Grover, A., Laskin, M., Abbeel, P., Srinivas, A., & Mordatch, I. (2021). Decision Transformer: Reinforcement Learning via Sequence Modeling. Advances in Neural Information Processing Systems, 18, 15084–15097.
Jonschkowski, R., Rastogi, D., & Brock, O. (2018, June). Differentiable Particle Filters: End-to-End Learning with Algorithmic Priors. Proceedings of Robotics: Science and Systems. https://doi.org/10.15607/RSS.2018.XIV.001