Understanding Large Language Models Through Statistical Concepts
Course Information
- Date
-
- Thursday, June 10, 2027,
9:00 AM till 5:00 PM- Friday, June 11, 2027,
9:00 AM till 5:00 PM - Thursday, June 10, 2027,
- Registration Opens
- January 13, 2027, 9:00 AM
- Registration Deadline
- May 13, 2027, 12:00 PM
- Course Fees
- This course is free of charge and for doctoral candidates and postdocs of the University of Basel only (min. 6, max. 16 participants).
- Trainer
-
Dr. Johanna Einsiedler
- Credits
- This course may be credited towards Module 1 of the Focus Area AI-Skills (16h)
- Organized by
-
Graduate Center
Transferable Skills
grace@unibas.ch
GRACE Homepage
Aims
The course explains how large language models work by building them up from core statistical ideas, and uses LLMs as a running example to teach statistical concepts that apply across disciplines. By the end of the course, participants will be able to:
- explain the basic mechanics of LLMs (next-token prediction, sampling, embeddings, attention) in statistical terms
- understand likelihood, maximum likelihood estimation, and priors, and recognize that the training objective of LLMs (cross-entropy) is a familiar statistical quantity under a different name
- explain overfitting and the bias-variance trade-off, and how they relate to replicability in empirical research
- critically evaluate performance claims using sampling uncertainty, bootstrap confidence intervals, and error rates broken down by subgroup
The course is designed for PhD students from all disciplines. No prior machine learning experience is required. Basic familiarity with Python is helpful but not essential: the notebooks are prepared, and most exercises involve running code, predicting outcomes, and interpreting results rather than writing code.
Content
Day 1: From counting to cross-entropy
- Building an analogue language model
- From counts to probability: random variables, probability vs. likelihood, and the idea of a prior
- Prediction and entropy: Shannon’s guessing game & entropy as an uncertainty measure
- Practical: building a first bigram language model on a shared text corpus and generating text from it
- Sampling and randomness: temperature and other sampling strategies, sampling variability, and the link to hallucinations
- Estimation and the loss function: maximum likelihood estimation and how it leads to cross-entropy and perplexity
- Overfitting and generalization: the bias-variance trade-off and its connection to the replication crisis (forking paths, exploratory vs. confirmatory analysis)
- Where does our model fail?
Day 2: From counting to context
- Unseen events and priors: smoothing as a prior
- Similarity and structure: covariance, PCA, and word embeddings, and what “similar” means in a vector space; a brief look at how neural models are trained when no closed-form solution exists
- Context and attention: why fixed context windows fail, attention as weighted averaging, and a conceptual overview of the transformer
- Evaluating outputs under uncertainty: benchmark scores as estimates from finite samples, bootstrap confidence intervals for model comparisons, and differences in error rates across subgroups
Methods
The course combines whiteboard-based lectures with hands-on exercises in prepared Jupyter notebooks.
Target Group
All Doctoral Candidates & Postdocs
About the Trainer
Johanna Einsiedler is a postdoctoral researcher at the Digital Humanities Lab, University of Basel, and at the Center for Social Data Science, University of Copenhagen. Her research covers AI for science, causal machine learning and uncertainty, metascience and reproducibility. A central part of her work evaluates how well LLMs can take over research tasks such as annotation and data extraction.
Workload
Preparatory work: 4h
Course attendance: 16h
Feature
Once registration is open, applications will be collected for 24 hours and course places allocated by lot. All registrations received after the initial 24h period will be put on a waiting list and assigned on a first come, first served basis.
Course places/places on the waiting list will be confirmed by e-mail. Course registrations can only be canceled before the registration period ends (send an e-mail to grace@unibas.ch). Full course attendance is mandatory. Participants who fail to attend a course without prior notification or withdraw after the registration deadline are subject to a fee of CHF 30. In addition, participants who cancel their course registration at a later point in time, are absent without an excuse or do not attend the entire course will, for reasons of fairness, not be considered for course registration in the following semester and will be removed from other courses offered in the same semester. Please find the detailed regulations on the Transferable Skills Homepage.