Home

Mahdi Afshari

I study computer science at MIT (BS 2027, MEng 2028) and do research at CSAIL with Jacob Andreas, on how language models learn and coordinate. I'm looking for ML research engineering roles.

Research

Self-Adapting Language Models via Learned Acquisition & Injection

Jun 2026 – Present

Jacob Andreas, CSAIL, MIT

An RL loop that trains a policy to find and inject the knowledge a frozen LLM needs, scored by forced-choice accuracy gains over fixed-prompt and cold baselines on held-out questions.

LLM Ensemble Forecasting for Prediction Markets

Feb – May 2026

Jacob Andreas, Steven Henry, CSAIL, MIT

The best single LLM forecaster earned significantly higher ROI than the human-crowd aggregate (+4.0% vs. −0.5%, p=0.004) at statistically indistinguishable accuracy, across 822 resolved questions. Manuscript under review.

Diplomacy AI for Autonomous LLM Agent Negotiation

Oct 2025 – Jan 2026

Jacob Andreas, CSAIL, MIT

Extended MCrafter with alliance, trade, truce, and protection primitives so 10+ LLM agents with competing goals could negotiate and form coalitions on their own.

Inferring Dynamics of Memory Encoding and Recall with Sequential Sampling Models

Jun – Dec 2024

Mehrdad Jazayeri Lab, McGovern Institute, MIT

Modeled human and primate memory with drift diffusion models and Gaussian process regression. Encoding degrades predictably with delay, while recall shows threshold shifts that suggest distinct neural mechanisms.

Hierarchical Modeling of Protein Structure for Predicting Function

Jan – May 2024

Manolis Kellis Lab, CSAIL, MIT

Built a feedback loop between structure and function models using fine-tuned ESMFold embeddings, improving function annotation accuracy by 15% on a benchmark set.

Projects

Cut training iteration time 45% under persistent stragglers (1298ms to 717ms, p<0.0001) by giving bandwidth to the workers holding everyone up, with under 1% change under bursty delay.

Compared five memory designs in a repeated public-goods game. Full conversation history bought no welfare gain over no memory at all, at 50% more tokens.

An open-source forecasting pipeline for Kalshi markets, with typed stages, log-odds aggregation, and deterministic, leakage-checked backtest replay.

A self-hosted finance app that syncs bank and crypto accounts, with credentials encrypted by AES-256-GCM and zero telemetry.

A routing protocol for simulated deep-space networks that holds over 95% delivery under a 10% random node-failure rate, where the baseline Bundle Protocol drops to about 60%.

One app for patients and doctors, with a fine-tuned medical chat model that sees live wearable data. Won the $1,000 Tune AI sponsor award at HackMIT.

Experience

Teaching Assistant for Computation Structures (6.1910)

Feb 2025 – Present

MIT EECS

Lead weekly labs and office hours for 200+ students, debugging their processors live with an average fix time under 10 minutes. Release labs, write quizzes, and maintain course infrastructure.

President, International Students Association

Feb 2024 – Sep 2025

MIT

Designed a coordination framework for 15+ cultural organizations, now used campus-wide, and ran four events of 300 to 1,100 attendees on a $50k+ total budget.

AI Music Recommender (AIM Labs)

Oct – Dec 2023

AI@MIT

Built a Siamese network for music similarity on 10k+ tracks, raising recommendation accuracy from 60% to 78% in blind A/B tests with 50 users.

Education

Massachusetts Institute of Technology (MIT)

Sep 2026 – May 2028

MEng in Computer Science

Massachusetts Institute of Technology (MIT)

Sep 2023 – May 2027

B.S. in Computer Science, GPA 4.7/5.0

National Organization for Development of Exceptional Talents (NODET)

Sep 2019 – Jun 2022

High School Diploma, Natural Sciences, GPA 4.0/4.0

Skills

ML/DL:
PyTorch, JAX, HuggingFace Transformers, PEFT/LoRA, vLLM, RL post-training (GRPO, ReST-EM, rejection sampling), Gaussian Processes
Languages & Systems:
Python, TypeScript (Next.js/React/Node), C, RISC-V Assembly, Bluespec/Minispec, distributed training (Gloo, ring all-reduce), Docker, Linux, Slurm
Tools:
Git, PostgreSQL, SQLite, Prisma, Vercel, OpenAI/Anthropic/Perplexity APIs

Awards

  • 33rd International Biology Olympiad: Gold Medal, ranked #7 globally among 300+ participants from 75+ countries.2022
  • 23rd National Biology Olympiad: Gold Medal.2020
  • 5th & 6th National Stem Cell and Regenerative Medicine Olympiad: Top 40 and Gold Medal.2020, 2021
  • 5th & 7th National Brain Bee Neuroscience Competition: Bronze and Silver Medal.2019, 2021