Fundamentals of AI/ML · Autumn 2026–27 · IIT Roorkee

The Course in One Picture


In this course, we are trying to build the Spine of model AI using mathematical language. The course spine we will build lecture by lecture, and the this illustration shows how the spine connects with modern AI. ▸ click any block to see what we will actually cover

Where it shows up · modern AI
What we build · the course spine
What it stands on · mathematical language
Mathematical language · review module

Linear Algebra

Strip away the anthropomorphic language — “learn”, “attend”, “understand” — and what remains, almost without exception, is linear algebra executed at scale.

  • Vectors, matrices, and why every dataset is a matrix X ∈ ℝn×d (MNIST is 60,000 × 784)
  • Matrix–vector products as predictions: the linear model ŷ = wTx and stacked layers σ(Wx+b)
  • Inner products, norms, and cosine similarity — how “semantically similar” is actually computed
  • Cauchy–Schwarz and why similarity scores stay in [−1, 1]
  • Eigenvalues, eigenvectors, SVD, and PCA — finding the directions that matter
  • Condition number: why some loss valleys make gradient descent zigzag
  • Gradients as vectors — the bridge into optimization

Feeds: Learning Theory (hypothesis sets are parameter spaces) and every model we write down all semester.

Mathematical language · review module

Probability

Learning from data is a bet against randomness; probability is how we compute the odds of that bet.

  • Random variables, distributions, expectation and variance
  • Conditional probability, independence, and i.i.d. sampling — the one assumption that makes learning feasible
  • Bayes' rule — stated here, exploited fully in Bayesian Learning
  • Common distributions we will actually use: Bernoulli, Binomial, Gaussian
  • Concentration of measure: Markov → Chebyshev → Hoeffding, built step by step
  • Laws of Large Numbers — why sample averages can be trusted

Feeds: the Hoeffding bound at the heart of Learning Theory, and the Gibbs distribution p ∝ e−βE in energy-based modeling.

Course spine · unit in three parts

Learning Theory

“My model is perfect on the training data — so am I done?” Every lecture in this unit is machinery for turning “we cannot tell” into a probabilistic guarantee.

  • What a learning problem is: unknown target f, data D, hypothesis set H, learned g
  • Is learning feasible? Why learning outside the data is impossible without probability
  • Hoeffding's inequality: Ein tracks Eout for one fixed hypothesis
  • Verification vs learning — paying for choice with the union bound (PAC framing)
  • Dichotomies, the growth function, and the VC dimension: the effective number of hypotheses
  • The VC bound: Eout ≤ Ein + complexity price
  • Bias–variance decomposition — the same tension through a second lens
  • Overfitting, regularization, and validation: theory turned into engineering advice

Explains: why a billion-parameter network can generalise at all — the question no demo answers.

Course spine · energy-based view of learning

Energy & Loss Functions

Train a model by shaping an energy landscape: push down on the right answers, pull up on the wrong ones.

  • Energy as compatibility: a scalar E(W, Y, X) scoring how well output Y fits input X
  • Inference as energy minimisation: predict Y* = argminY E(W, Y, X)
  • One framework, many questions: prediction, classification, ranking, detection
  • From energies to probabilities: the Gibbs distribution, partition function, and temperature β
  • Latent variables Z — minimising over what we cannot observe
  • Designing a loss functional: correct answer lowest ⇒ low loss; margins and the energy gap
  • The loss zoo: energy loss, perceptron loss, hinge, log, square–square, negative log-likelihood
  • Which losses work and which collapse — and why architecture and loss must be designed together

Explains: the objective functions inside modern generative models — p(x) ∝ e−E(x) is their common ancestor.

Course spine · how learning actually happens

Optimization for ML

Every training run on Earth is some variant of one line: w ← w − η ∇wL(w).

  • The optimization view of learning: minimise a loss over parameters
  • Gradient descent: the update rule, step size η, and what can go wrong
  • Stochastic gradient descent and minibatches — trading noise for speed
  • Geometry of convergence: convexity, curvature, and conditioning (long valleys make GD zigzag)
  • Constrained optimization: Lagrange multipliers and a working sketch of KKT
  • Practical matters: learning-rate schedules, stopping criteria

Explains: what “training” means, from a two-parameter line fit to GPT-scale runs.

Course spine · honest measurement

Hyperparameters, Validation & Evaluation

A model has not worked until you can say, honestly and quantitatively, how well it works on data it never saw.

  • Train / validation / test splits — and what each is allowed to touch
  • Hyperparameters vs parameters; model selection without cheating
  • Cross-validation: k-fold and when to use it
  • Classification metrics: confusion matrix, accuracy, precision, recall, F1
  • Threshold-free evaluation: ROC curves and AUC
  • Regression metrics and reporting results you can defend

Explains: why leaderboard numbers can lie, and how honest benchmarks are built.

Course spine · learning as belief update

Bayesian Learning

Instead of one best answer, keep a distribution over answers — and let the data reshape it.

  • Bayes' rule as a learning rule: prior × likelihood → posterior
  • Maximum likelihood vs maximum a posteriori (MAP) — where regularization comes from
  • A fully worked conjugate example: Beta–Bernoulli coin flipping
  • The posterior predictive: predictions that carry their own error bars
  • Priors as assumptions made visible

Explains: uncertainty-aware AI — systems that know what they don't know.

Modern AI · where the fundamentals show up

Deep Networks & LLMs

When people say a model has seven billion parameters, they mean, almost entirely, entries of matrices.

  • A deep network is a chain of maps x ↦ σ(Wx+b); the nonlinearity stops the chain collapsing into one matrix
  • Attention scores token pairs with scaled inner products, arranged as QKT — Linear Algebra at industrial scale
  • Training a network is gradient descent on a loss — Optimization, verbatim
  • Why does it generalise? That is Learning Theory's question, asked at a billion parameters

Built from: Linear Algebra · Learning Theory · Optimization.

Modern AI · where the fundamentals show up

Generative Models

A generative model is an energy landscape you can sample from: data lives where the energy is low.

  • The energy-based view: p(x) ∝ e−E(x) turns any energy function into a distribution
  • Learning = shaping the landscape so real data sits in the valleys
  • The partition-function problem — why normalising is hard, and how loss design gets around it
  • The same picture underneath modern diffusion and contrastive methods

Built from: Energy & Loss Functions · Probability · Optimization.

Modern AI · where the fundamentals show up

Uncertainty-Aware AI

Wherever AI meets the physical world, “probably right” must come with a number attached.

  • Posterior distributions turn point predictions into predictions with error bars
  • Calibration: does “90% confident” mean right 90% of the time?
  • Where it matters: medicine, power grids, autonomous systems — anywhere a wrong answer costs something real

Built from: Bayesian Learning · Probability · Validation & Evaluation.

Figure prepared with the assistance of a large language model. Anthropic. (2026). Claude (Opus 4.8).