Generalized Linear Regression

Generalized Linear Regression extends the concept of linear regression by projecting the data into a higher-dimensional space before performing linear regression. This allows us to capture more complex relationships in the data. Let the data be $(x_i, y_i)$ for $i = 1, 2, …, n$ where $x_i \in \mathbb{R}^d$ and $y_i \in \mathbb{R}$. We define a feature map $\phi: \mathbb{R}^d \rightarrow \mathbb{R}^m$, where $m > d$. This map projects our original features into a higher-dimensional space. ...

January 1, 2025 · Victor

Generative Adversarial Networks (GANs)

Recall that generative models try to learn the data distribution $P_{data}$. GANs try to learn $P_{data}$ by approximating it by $P_{generator}$ by minimizing F-divergence $D_f(P_{data} || P_{generator})$. Derivation of GANs Let $\theta$ be the parameters of the generator such that it maps a sample $z \sim N(0, I)$ to a sample $x \sim p_{generator}$. Then, the optimal parameters for the generator can be expressed as: $$\theta^* = \underset{\theta}{\text{argmin}} D_f(P_{data} || P_{generator})$$ ...

January 1, 2025 · Victor

Generative vs Discriminative Models

Generative Model Let the training dataset be $$data = \{(x_i)\}_{i=1}^N$$ where $x_i \in \mathbb{R}^d$ are called data points. These data points are iid samples from the true data distribution $P(x)$. Aim of generative model is to extimate $P(x)$ using the training data and sample new data points from it. GANs, GMMs etc are a example of generative model. In GANs we use training data to train a neural network to learn the distribution of the data. Once we have learnt this distribution we can sample new data points from it. ...

January 1, 2025 · Victor

Hypothesis space (H)

Let the data be D = {($x_1$, $y_1$), ($x_2$, $y_2$), …, ($x_n$, $y_n$)} where $y_i$ is the label of the feature vector $x_i$. A hypothesis function $h$ is a function that maps the feature vector $x$ to the label $y$, ie $$h: X \to Y$$ The hypothesis space is the set of all possible hypothesis functions, denoted as $$H = {h | h: X \to Y}$$ During the learning process, we try to find the best hypothesis function $h$ from the hypothesis space $H$ that minimizes the error between the predicted label and the true label.

January 1, 2025 · Victor

Index for Artificial Intelligence Topics

Hypothesis Space Loss Functions Risk and Empirical Risk Learning Problem KL Divergence - Kullback-Leibler Divergence Minimizing KL Divergence is Equivalent to Maximizing Likelihood Bayes Classifier Logistic regression also known as logit regression or binary classification Softmax regression also known multiclass regression Expectation Maximization (EM) Algorithm Linear Regression Generalized Linear Regression Non-parametric Density Estimation Parzen Window Estimate K-Nearest Neighbour (KNN) Linear Discriminant Analysis (LDA) Maximum A Posteriori Estimate (MAP) Bias variance tradeoff ...

January 1, 2025 · Victor

Index for Deep Learning Topics

GANs What is the difference between generative model and discriminative models KL Divergence - Kullback-Leibler Divergence F-Divergence Convex conjugate (also known as the Fenchel conjugate or the Legendre transform) GANs Naive GANs Wasserstein metric Wasserstein GANs Frechet Inception Distance (FID) Conditional GANs(cGANs) Domain adversarial networks VAEs Variational encoding(VAEs) Two types of neural networks Aggregated posterior mismatch VAE as regularized autoencoder and Beta VAEs Info VAEs Vector Quantized VAEs (VQ-VAEs) DDPM Denoising Diffusion Probabilistic Models (DDPM) - part 1 Denoising Diffusion Probabilistic Models (DDPM) - part 2 Denoising Diffusion Probabilistic Models (DDPM) - part 3 Summarizing DDPM Score matching Score matching part 1 Score matching part 2 Score matching part 3 Difference between SMLD and DDPM Conditional score matching SDEs Precursor to Stochastic Differential Equations (SDEs) Stochastic Differential Equations (SDEs) Some example problems Anderson’s result DDPMs as SDE SMLD as SDE Main takeaway DDIM DDIM inversion Sequence2sequence models Transformers State space models & Mamba Self supervised learning Noise contrastive estimation Info-NCE Masked reconstruction JEPA - Joint Embedding Prediction and Autoencoding Misc Distillation Cheatsheet Cheatsheet

January 1, 2025 · Victor

Infinite horizon discounted cost problems

In infinite horizon discounted cost problems, we consider scenarios without a termination state and an infinite sequence of decisions. Let’s understand the key components and mathematical formulation. Problem Setting State Space: Set of states $S = {1,2,…,n}$. Note that there is no terminal state unlike in finite horizon problems. Action Space: For each state $i$, set of feasible actions $A(i)$ Total action space: $A = \bigcup_{i \in S} A(i)$ Cardinality: Both $|S|$ and $|A|$ are finite Optimal Cost Function The optimal cost function $J^*(i)$ represents the minimum total discounted cost starting from state $i$: ...

January 1, 2025 · Victor

Info VAEs: Information Maximizing Variational Autoencoders

InfoVAE addresses the aggregated posterior mismatch problem in standard VAEs by modifying the objective function to explicitly match the aggregated posterior with the prior distribution. Key Ideas If the aggregated posterior $q_\phi(z)$ becomes a Dirac delta, all inputs $x$ map to the same latent code $z$ In such a scenario, the latent code $z$ would contain no information about the input $x$ The standard VAE objective does not directly encourage the matching between $q_\phi(z)$ and the prior $p(z)$ InfoVAE Objective Function The standard VAE objective is given by: ...

January 1, 2025 · Victor

Info-NCE

Idea Instead of using 1 negative sample, why not use more? Formulation Let us formalize the Info-NCE framework: Given: A data point $x \in \mathcal{X}$ from input space $\mathcal{X}$ A context $c \in \mathcal{C}$ from context space $\mathcal{C}$ A positive sampling distribution $p_{pos}(x,c)$ A negative sampling distribution $p_{neg}(x,c)$ We sample: One positive sample $x^+ \sim p_{pos}(x,c)$ $N-1$ negative samples $\{x^-_i\}_{i=1}^{N-1} \sim p_{neg}(x,c)$ The InfoNCE loss is defined as: $$\mathcal{L}_{\text{InfoNCE}} = -\mathbb{E}\left[\log \frac{\exp(f_\theta(x)^\top f_\theta(x^+))}{\exp(f_\theta(x)^\top f_\theta(x^+)) + \sum_{i=1}^{N-1} \exp(f_\theta(x)^\top f_\theta(x^-_i))}\right]$$ where: ...

January 1, 2025 · Victor

Introduction to Controlled Markov Chains and Markov Decision Processes

Controlled Markov Chain (CMC) A Controlled Markov Chain (CMC) is a stochastic process ${X_n}_{n \geq 0}$ that evolves over discrete time steps $n = 0, 1, 2, \ldots$. At each time step $n$, the system is in a state $X_n$ belonging to a state space $S$. To influence the evolution of this process, we apply a control or action $Z_n$ from a set of feasible actions $A(X_n)$ that depends on the current state $X_n$. Thus, $Z_n \in A(X_n)$. ...

January 1, 2025 · Victor