CS 394E · Fall 2026/2027
Schedule
15 weeks, Mondays at 14:30 – 17:30. At most two readings per week; each summary is due 12:30 Saudi time on the day of class.
Topics follow the syllabus. Readings, presenters and slides are added as the term progresses — check back the week before each class.
No weeks match that filter.
Course Overview and Introduction to LLMs
One-off: this week meets twice, Monday and Thursday, 14:30–16:00, in Classroom 3223. From week 2 the course meets Mondays only, 14:30–17:30, in Classroom 4225.
Introduction & Course Overview
N-gram Language Models
Further reading N-gram Language Models Speech and Language Processing, 3rd ed. draft (Aug 2026), ch. 3 PDF Free textbook chapter behind the N-gram lecture.
4 topics
- Course Overview
- What are Language Models
- A Brief History: From N-grams to Transformers to Agentic AI
- Common NLP Tasks and LLM applications
Tokenization and Vector Embeddings; Neural Language Models
Required A Neural Probabilistic Language Model JMLR 2003
Further reading Words and Tokens Speech and Language Processing, 3rd ed. draft (Aug 2026), ch. 2 PDF Background for the tokenization half of the lecture.
Further reading Embeddings Speech and Language Processing, 3rd ed. draft (Aug 2026), ch. 5 PDF Background for the vector-semantics half of the lecture.
7 topics
- Properties of an efficient tokenizer; vocabulary size and out-of-vocabulary handling
- Subword tokenization: BPE, WordPiece and Unigram; byte-level BPE in practice
- Dense vector embeddings and the geometry of word meaning
- Measuring similarity: dot product, vector norms and cosine similarity
- Word2Vec and the CBOW model
- Bengio's neural probabilistic language model; the curse of dimensionality
- Why neural LMs generalize better than N-grams
Attention and Transformers
Attention
Transformers
Required Attention Is All You Need NeurIPS 2017
Further reading Neural Networks Speech and Language Processing, 3rd ed. draft (Aug 2026), ch. 6 PDF A refresher, if you need one.
Further reading Transformers and Pretraining Speech and Language Processing, 3rd ed. draft (Aug 2026), ch. 7 PDF Textbook companion to Attention Is All You Need.
9 topics
- From static embeddings to context-dependent representations
- Attention as an averaging lookup table
- Self-attention: queries, keys, values and scaled scores
- Multi-head attention, and why heads specialize
- Positional encodings
- Encoder, decoder and encoder-decoder architectures
- RNNs and the limitations that motivated Transformers
- BLEU and the evaluation of machine translation
- Transformer results: complexity, parallelization and long-range dependencies
Post-training, Alignment, and Tool Use
Required ReAct: Synergizing Reasoning and Acting in Language Models ICLR 2023
Required s1: Simple test-time scaling EMNLP 2025
Further reading Post-training Speech and Language Processing, 3rd ed. draft (Aug 2026), ch. 8 PDF Instruction tuning, parameter-efficient fine-tuning and preference alignment.
Further reading Tree of Thoughts: Deliberate Problem Solving with Large Language Models NeurIPS 2023 Search over a tree of intermediate thoughts instead of one chain.
Further reading Does Reinforcement Learning Really Incentivize Reasoning Capacity in LLMs Beyond the Base Model? NeurIPS 2025 At high pass@k, RLVR models do not beat their own base model.
9 topics
- From pretraining to a usable model: supervised fine-tuning and instruction tuning
- Preference alignment: RLHF, reward models and direct preference optimization
- Decoding and temperature: the distribution behind every sampled answer
- pass@k: what the model can reach in k attempts, and the gap from pass@1
- Reinforcement learning from verifiable rewards
- Chain-of-thought: buying serial computation with tokens
- Reasoning models and inference-time compute
- Test-time scaling: budget forcing, deliberation, search and verification
- Tool use and the agent loop: reasoning interleaved with acting — introduced through the ReAct paper
Hallucinations: Why They Happen, and How to Catch Them
Required Detecting hallucinations in large language models using semantic entropy Nature 2024
Then the paper for your track:
Track A Why Language Models Hallucinate arXiv 2025
Track B Why and How LLMs Hallucinate: Connecting the Dots with Subsequence Associations NeurIPS 2025
Further reading Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools Journal of Empirical Legal Studies, 2025 Legal RAG products advertised as hallucination-free hallucinate 17–33% of the time.
Further reading AbstentionBench: Reasoning LLMs Fail on Unanswerable Questions NeurIPS 2025 Reasoning fine-tuning makes models answer confidently when they should abstain.
7 topics
- What counts as a hallucination, and a taxonomy of the failure modes
- Why hallucination may be inevitable: the statistical and the incentive accounts
- Detection: uncertainty, semantic entropy and self-consistency
- Mitigation before, during and after generation
- Abstention: knowing when not to answer
- Benchmarks for factuality, and what they do and do not measure
- Reliability in deployment: the legal-research case
Evaluating LLMs: Benchmarks, Judges and Leaderboards
Required Emergent Misalignment: Narrow Finetuning Can Produce Broadly Misaligned LLMs ICML 2025
Then the paper for your track:
Track A Chatbot Arena: An Open Platform for Evaluating LLMs by Human Preference ICML 2024
Track B HALoGEN: Fantastic LLM Hallucinations and Where to Find Them ACL 2025
Further reading Survey on Evaluation of LLM-based Agents arXiv 2025 Survey of agentic, trajectory and environment-based evaluation.
Further reading Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena NeurIPS 2023 Position, verbosity and self-enhancement bias in LLM judges.
Further reading The Leaderboard Illusion NeurIPS 2025 Undisclosed private testing and selective disclosure skew Arena rankings.
9 topics
- A taxonomy of evaluation: offline, online and continuous
- Human preference evaluation and the arena model
- LLM-as-a-judge: agreement with humans, and its biases
- Automatic verification against ground truth
- Environment-based agent evaluation: GAIA, WebArena, SWE-bench
- Trajectory evaluation for multi-step agents
- Training-data contamination
- How leaderboards mislead
- Reading a paper critically: a review clinic
RAG at Scale and Multi-Agent Frameworks
Required Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks NeurIPS 2020
Required AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation COLM 2024
Further reading Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection ICLR 2024 Reflection tokens let the model decide when to retrieve and critique what comes back.
Further reading The Faiss library IEEE Transactions on Big Data, 2026 The indexing and quantization machinery under retrieval.
Further reading Retrieval meets Long Context Large Language Models ICLR 2024 4K context plus retrieval matches a fine-tuned 16K model.
7 topics
- Retrieval-augmented generation: a parametric model plus a non-parametric index
- Embedding models, chunking and indexing choices
- Vector databases, Faiss and approximate nearest-neighbor search
- Hybrid search and reranking
- Retrieval versus long context: when is retrieval still needed?
- Multi-agent frameworks: conversable agents and AutoGen
- Chain of thought, debate and verification as composition patterns
Mid-semester Break
Mid-semester break
No class
Agent Infrastructure, Memory, and Observability
Required Why Do Multi-Agent LLM Systems Fail? NeurIPS 2025
Then the paper for your track:
Track A MemGPT: Towards LLMs as Operating Systems arXiv 2023
Track B Recursive Language Models arXiv 2025
Further reading Lost in the Middle: How Language Models Use Long Contexts TACL 2024 Models use the start and end of a long context and lose the middle.
Further reading Model Context Protocol: Architecture MCP documentation Protocol documentation, not a paper. No summary due.
Further reading What is A2A? A2A protocol documentation Protocol documentation, not a paper. No summary due.
9 topics
- Agent architecture: planning, memory, tools and execution graphs
- Short-term and long-term memory; paging the context window
- Context engineering, and what being lost in the middle costs
- Agent interoperability: MCP and A2A
- Workflow orchestration and state management
- Observability and tracing for agent systems
- Human-in-the-loop control
- Reliability and recovery: why multi-agent systems fail
- Monitoring deployed agentic systems
LLM System Design and Serving at Scale
Required Orca: A Distributed Serving System for Transformer-Based Generative Models OSDI 2022
Required Efficient Memory Management for Large Language Model Serving with PagedAttention SOSP 2023
Further reading Mooncake: Trading More Storage for Less Computation — A KVCache-centric Architecture for Serving LLM Chatbot FAST 2025 Disaggregated serving built around the KV cache; in production behind Kimi.
Further reading Taming the Titans: A Survey of Efficient LLM Inference Serving arXiv 2025 Survey of speculative decoding, quantization and inference scheduling.
Further reading RouteLLM: Learning to Route LLMs with Preference Data ICLR 2025 Routing between a strong and a weak model: >2× cheaper at matched quality.
9 topics
- The LLM application stack: prompt, inference, vector-store and tooling layers
- Data pipelines and model selection
- Continuous, iteration-level batching and the scheduling of inference
- KV cache management, paged memory and prefix reuse
- Distributed and disaggregated serving; separating prefill from decode
- Quantization and speculative decoding
- Serving long context
- Small language models and request routing
- Cost, latency and energy as first-class constraints
LLMs for Scientific Discovery
Which two papers you read depends on your track:
Track A Can LLMs Generate Novel Research Ideas? A Large-Scale Human Study with 100+ NLP Researchers ICLR 2025
Track A The Ideation-Execution Gap: Execution Outcomes of LLM-Generated versus Human Research Ideas arXiv 2025
Track B Barbarians at the Gate: How AI is Upending Systems Research arXiv 2025
Track B The Last Human-Written Paper: Agent-Native Research Artifacts arXiv 2026
Further reading Predicting Empirical AI Research Outcomes with Language Models NeurIPS 2025 Forecasting which experiments will pan out before running them.
Further reading PaperBench: Evaluating AI's Ability to Replicate AI Research ICML 2025 Can agents reproduce 20 ICML papers from scratch? Rubrics by the original authors.
7 topics
- Hypothesis and idea generation, and how to judge novelty
- From idea to execution: does the advantage survive a result?
- Literature review and research acceleration
- Automating research in fields where verification is cheap
- Reproducing published work with agents
- Predicting research outcomes before running the experiment
- What a research artifact should look like once agents are the readers
LLMs in Healthcare and Education
Which two papers you read depends on your track:
Track A Towards conversational diagnostic artificial intelligence Nature 2025
Track A An evaluation framework for clinical use of large language models in patient interaction tasks Nature Medicine 2025
Track B AI tutoring outperforms in-class active learning: an RCT introducing a novel research-based design in an authentic educational setting Scientific Reports 2025
Track B MathTutorBench: A Benchmark for Measuring Open-ended Pedagogical Capabilities of LLM Tutors EMNLP 2025
Further reading Towards conversational artificial intelligence for disease management Nature 2026 AMIE across multiple visits, grounded in clinical guidelines; non-inferior to 21 physicians.
Further reading Large language models for frontline healthcare support in low-resource settings Nature Health 2026 101 community health workers in Rwanda: the models beat the local clinicians.
Further reading Tutor CoPilot: A Human-AI Approach for Scaling Real-Time Expertise arXiv 2024 Give the model to the tutor, not the student: +9 p.p. for the weakest tutors.
8 topics
- Diagnostic reasoning and clinical decision support
- Conversational diagnosis, and evaluating it with simulated patients
- Clinical data, EHR and FHIR; ambient scribes
- Domain-specific medical models, and where they lose to general ones
- Intelligent tutoring systems and conversational tutors
- Scaffolding and guardrails as system design
- Learning versus performance: measuring what the tutor actually taught
- Deployment in high-stakes settings: trust, safety and regulation
From Language Models to World Models
Required Language Models Represent Space and Time ICLR 2024
Required Evaluating the World Model Implicit in a Generative Model NeurIPS 2024
Further reading The Platonic Representation Hypothesis ICML 2024 Vision and language converge on one model of reality.
Further reading Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Task ICLR 2023 A GPT trained only on Othello moves builds a board state you can intervene on.
Further reading V-JEPA 2: Self-Supervised Video Models Enable Understanding, Prediction and Planning arXiv 2025 Learn the world from video, not text. Not a language model.
6 topics
- What a world model is, and what would count as evidence of one
- Probing for structure: linearly decodable space and time
- Coherence of the implicit model, and where it breaks down
- Emergent world representations in game-playing models
- The Platonic representation hypothesis: convergence across modalities
- The grounding argument against text-only world models
AI Agents in the Physical World
Required OpenVLA: An Open-Source Vision-Language-Action Model CoRL 2024
Required π₀: A Vision-Language-Action Flow Model for General Robot Control RSS 2025
Further reading Gemini Robotics 1.5: Pushing the Frontier of Generalist Robots with Advanced Embodied Reasoning, Thinking, and Motion Transfer arXiv 2025 Generality from a frontier VLM's world knowledge rather than robot data.
Further reading π₀.₅: A Vision-Language-Action Model with Open-World Generalization CoRL 2025 Does the recipe transfer to homes it has never seen?
Further reading Open X-Embodiment: Robotic Learning Datasets and RT-X Models arXiv 2023 1M+ trajectories, 22 robots, 527 skills: the cross-embodiment dataset.
7 topics
- Vision-language-action models: language models with actions attached
- Action tokenization, and flow-matching action experts
- Robot foundation models and cross-embodiment data
- Where generality comes from: robot data versus a frontier VLM's world knowledge
- Sim-to-real transfer
- Human-robot interaction
- Safety for embodied agents
Project Presentations
Project presentations
1 topic
- Final project presentations and discussion