Rayhaan Khan

Machine learning research · Navi Mumbai, India

I am in my final year of Cambridge A Levels at Podar International School in Navi Mumbai. My research asks what a trained neural network needs in order to keep learning after release. At ADIA Lab I worked on rebuilding the optimizer state that public checkpoints leave out, which became my first-author manuscript, now under review at TMLR. At MBZUAI I am testing test-time training, where a model updates part of its weights while it reads.

I also founded Mumbai AI Lab, which teaches school students to use AI as a tutor that asks them questions. Away from the screen I photograph wildlife, read about shark biology and reread Tintin.

Portrait of Rayhaan Khan

News

Research

I study what happens to a network after training ends. How can training continue without losing what the network knew, and can the network adapt to new input at test time? Earlier work applied machine learning to diabetes screening.

Seed-averaged RULER effects by context length: the training effect ranges from minus 1.1 to plus 3.8 points, the update effect from minus 2.5 to plus 0.2. -2 0 +2 +4 4k 8k 16k 32k 64k YaRN RULER points, both seeds training effect update effect

In-Place Test-Time Training on Qwen3-4B: A Controlled Ablation of the Test-Time Update

Rayhaan Khan

Interim report, 2026

Research internship at MBZUAI with Dr Salman Khan and Hanoona Rasheed

In-Place TTT turns the MLP down-projection in some layers of a language model into fast weights that update from the input during inference. Its published results on Qwen3-4B show long-context gains over a matched control. Those gains mix two causes, the update at test time and the training with the module.

I continued pretraining Qwen3-4B for 3 billion tokens with and without the module, on identical data in identical order. I then evaluated the trained model twice, with its update on and off. Switching the update off changes the RULER score by at most 0.4 points up to 64k tokens, so the gains come from training with the module. This text-model study is the baseline for porting the method to a Qwen vision-language model.

Toy simulation: two Adam runs fine-tune from the same checkpoint on a narrow valley. The cold start jumps across the valley in its first steps; the run started from rebuilt optimizer state moves smoothly along it.
cold start vs rebuilt state, toy

Stable Continual Pre-training from Weights-Only Checkpoints via Rebuilt Optimizer State

Rayhaan Khan, Shadab Khan

Under review at Transactions on Machine Learning Research (TMLR), 2026

Research internship at ADIA Lab with Dr Shadab Khan, April 2025 to June 2026

Public language-model checkpoints ship weights without the AdamW state that trained them, so continued pre-training restarts the optimizer from zero. The first steps of that cold start overshoot, and the model forgets part of what it knew. We show that about 200 short training steps on public data rebuild the useful part of the missing state.

Warm-starting from the rebuilt state removes the early overshoot. Used as an elastic weight consolidation anchor, it matches the target loss of a cold start with about three times less forgetting at 1B parameters. We tested it on models from GPT-2 (124M parameters) to LLaMA-3 (8B).

My part: a pipeline that logged optimizer buffers while training a CIFAR-10 CNN, used to measure rebuilt state against the original.

XGBoost feature importance (F score): glucose 213, BMI 190, age 123, diabetes pedigree 61, blood pressure 52, insulin 51, pregnancies 7, skin fold 3. Feature importance (F score) Glucose 213 BMI 190 Age 123 Pedigree 61 Blood pressure 52 Insulin 51 Pregnancies 7 Skin fold 3

Diabetes Risk Screening from Routine Measurements

Rayhaan Khan

Technical report, 2024

Research internship at M42, Abu Dhabi, with Dr Shadab Khan

I trained models to estimate diabetes risk from eight routine measurements, including glucose, BMI, blood pressure and age, on a public dataset of 768 patients. I compared fastai and XGBoost models, explained predictions with feature importance and checked accuracy across subgroups. The deployed web app lets a user change the inputs and get a new estimate. The repository follows Microsoft's Team Data Science Process, from project charter to customer acceptance.

Teaching and open source

The hint ladder: a nudge, then the relevant concept, then a worked step, then the full answer, each given only when the student stalls. What have you tried so far? nudge 1 concept 2 worked step 3 full answer 4 only when the student stalls

Socratic Tutor, a Claude plugin that teaches by asking

Mumbai AI Lab

Open source (MIT), 2026. Submitted to Anthropic's plugin directory

With the plugin installed, Claude asks a student what they have tried, finds the one step that blocks them and asks one question per turn. Help rises only when the student stalls, from a nudge to the relevant concept, then a worked step, then the full solution. The design follows a field experiment with nearly 1,000 high school students. Those who practised with an unrestricted chatbot scored 17% lower on a later exam, and a version that gave hints removed most of that harm.

Fieldwork

Intertidal survey, Juhu rocky shore, Mumbai Marine Science, 2025

Quadrat sampling of the rocky shore and a Lincoln index estimate of a clam population. The index marks M clams, catches C later, counts the R marked clams among them and estimates the population as N ≈ MC/R. We also recorded a juvenile bamboo shark in a rock pool.

A quadrat frame with clams, some of them marked. N ≈ MC / R

Awards

Education

Podar International School, Nerul, Navi Mumbai. Cambridge International A Levels, graduating 2027, in Mathematics, Computer Science, Marine Science, Physics, Biology and English. Highest AS Level Marine Science result in the cohort.

Courses. Harvard CS50P, Introduction to Programming with Python (2024, verified). fast.ai Practical Deep Learning for Coders (2022). Linear algebra and calculus for machine learning, self-taught.

Tools. Python with NumPy, pandas, scikit-learn, PyTorch, XGBoost and fastai; Git; Arduino in C and C++; 3D printing.

Languages. English and Hindi, fluent. German, beginner.