Category Archives: Blog

Your blog category

Graph Neural Networks

Problem: Give a broad sketch of the current state of the field of research in graph neural networks. Solution: Problem: Okay, so now explain what a graph neural network (GNN) actually is. Solution: A GNN is basically any neural network … Continue reading

Posted in Blog | Leave a comment

Renormalization Group

Problem: Consider a Landau-Ginzburg theory involving a single real scalar field \(\phi(\mathbf x)\) for \(\mathbf x\in\mathbf R^n\) governed by the canonically normalized free energy density: \[\mathcal F(\phi,\partial\phi/\partial\mathbf x,…)=\frac{1}{2}\biggr|\frac{\partial\phi}{\partial\mathbf x}\biggr|^2+\frac{\phi^2}{2\xi^2}+…\] Explain what the \(+…\) means, explain which terms have temperature \(T\)-dependence, … Continue reading

Posted in Blog | Leave a comment

Convolutional Neural Networks

CNNs_Part_1 $\textbf{Problem}$: Write functions that take an arbitrary grayscale image and convolve them with a Sobel edge detection kernel. Apply both functions to a grayscale image of your choice. $\textbf{Solution}$: InĀ [1]: import numpy as np import matplotlib.pyplot as plt sobel_horizontal_kernel … Continue reading

Posted in Blog | Leave a comment

Hamilton’s Optics-Mechanics Analogy

Problem: Deduce the Hamilton-Jacobi equation of classical mechanics. Solution: Instead of viewing the action \(S=S[\mathbf x(t)]\) as a functional of the particle’s trajectory \(\mathbf x(t)\), it can be viewed more simply as a scalar field \(S(\mathbf x,t)\) in which the … Continue reading

Posted in Blog | Leave a comment

Pseudo-Riemannian Geometry

Problem: Define the signature of a matrix. Hence, state and prove Sylvester’s law of inertia. Solution: The signature of an \(n\times n\) matrix \(A\) is a \(3\)-tuple \((n_+,n_-,n_0)\) where \(n_+\) is the number of positive eigenvalues of \(A\) (including multiplicity), … Continue reading

Posted in Blog | Leave a comment

Reinforcement Learning (Part \(1\))

Problem: How does the paradigm of reinforcement learning (RL) fit within the broader context of machine learning? Solution: It is instructive to compare/contrast reinforcement learning with supervised learning. In this way, it will be seen that RL can in fact … Continue reading

Posted in Blog | Leave a comment

Density Functional Theory

Problem: In one sentence, what is the essence of DFT? Solution: To replace \(\Psi\mapsto n\), where the number density of a system of \(N\) identical quantum particles (usually electrons) \(n(\mathbf x)\) is: \[n(\mathbf x):=N\int d^3\mathbf x_2…d^3\mathbf x_N |\Psi(\mathbf x,\mathbf x_2,…,\mathbf … Continue reading

Posted in Blog | Leave a comment

PyTorch Fundamentals (Part \(2\))

Problem: Do an end-to-end walkthrough of the PyTorch machine learning workflow using the most basic univariate linear regression example. In particular, generate some linear data over a normalized feature space (whose slope \(w\) and intercept \(b\) would in practice be … Continue reading

Posted in Blog | Leave a comment

PyTorch Fundamentals (Part \(1\))

Problem: Illustrate some of the basic fundamentals involved in using the PyTorch deep learning library. In particular, discuss the attributes of PyTorch tensors (e.g. dtype, CPU/GPU devices, etc.), how to generate random PyTorch tensors with/without seeding, and operations that can … Continue reading

Posted in Blog | Leave a comment

Self-Attention in Transformers

Problem: Explain how the transformer architecture works at a mathematical level (e.g. as outlined in the Attention Is All You Need paper). Solution: \[\Delta\mathbf x_i=V\text{softmax}\left(\frac{K^T\mathbf q_i}{\sqrt{n_{qk}}}\right)\] where \(K=(\mathbf k_1,…,\mathbf k_N)\in\mathbf R^{n_{qk}\times N}\) and \(V=(\mathbf v_1,…,\mathbf v_N)\in\mathbf R^{n_e\times N}\) are key … Continue reading

Posted in Blog | Leave a comment