mahdi afshari
MIT CS · systems, ML, building things that work
for the curious :3
Education
Massachusetts Institute of Technology (MIT)
B.S. in Computer Science · GPA: 4.7/5.0
-Coursework: ML, Computer Systems, Software Construction, Algorithms
Massachusetts Institute of Technology (MIT)
MEng in Computer Science
Research
Self-Adapting Language Models via Learned Acquisition & Injection
Jacob Andreas Lab – CSAIL, MIT
- -Designing an RL loop that trains a policy to acquire and inject task-relevant knowledge into a frozen LLM's context (later LoRA weights), scored by forced-choice accuracy gains over fixed-prompt and cold baselines on held-out questions.
- -Built the ReST-EM training pipeline (candidate sampling → retention gating → SFT) with reward-reliability and train/eval leakage-safety gates required before any training run.
- -Sole researcher on the implementation, with weekly meetings with the PI and Omar Khattab observing as a potential future collaborator.
LLM Ensemble Forecasting for Prediction Markets
Jacob Andreas, Steven Henry – CSAIL, MIT
- -Built the Polymarket data pipeline (deduplication, side-flip filtering, resolution tracking) and a 35-configuration ablation harness spanning model, temperature, persona, and information-access axes, evaluated on 822 resolved binary questions.
- -Found 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 (77.9% vs. 79.9%).
- -Showed that filtering to medium within-crowd agreement doubled ROI to +9.1%. Manuscript under review.
Diplomacy AI for Non-User-Mediated Multi-Agent LLMs
Jacob Andreas Lab – CSAIL, MIT
- -Built autonomous negotiation systems where LLM agents form alliances, trade resources, and coordinate without human mediation in Minecraft-like environments.
- -Extended MCrafter with 4 social primitives (alliance, trade, truce, protection) enabling 10+ concurrent agents with competing goals to negotiate autonomously.
- -Designed episodic memory and summarization layers to keep inference cost manageable while maintaining context across multi-turn negotiations.
- -Built evaluation infrastructure tracking diplomacy outcomes (alliance stability, resource distribution fairness) and construction progress in multi-village scenarios.
Inferring Dynamics of Memory Encoding and Recall
Mehrdad Jazayeri Lab – McGovern Institute, MIT
- -Designed and evaluated Drift Diffusion Models (DDMs) and their variants to capture behavioral patterns in short- and long-term memory tasks using data from 500+ trials per subject (human and non-human primates).
- -Integrated Gaussian Process (GP) regression into the modeling pipeline to estimate time-varying latent parameters, enabling non-parametric inference of cognitive dynamics and uncertainty quantification across trials.
- -Found that encoding dynamics degrade predictably with delay, but recall exhibits non-monotonic threshold shifts suggesting distinct neural mechanisms.
- -Applied probabilistic modeling techniques to analyze response distributions, jointly fitting reaction times and accuracy under varying memory loads and delays. Implemented models in JAX for GPU-accelerated parameter estimation.
Hierarchical Modeling of Protein Structure for Predicting Function
Manolis Kellis Lab – CSAIL, MIT
- -Developed a novel approach to predict protein function from secondary structure as part of a team.
- -Fine-tuned ESMFold embeddings for secondary structure inputs and implemented an iterative feedback loop that refines structure predictions by incorporating function prediction errors, creating a bidirectional refinement cycle between structure and function models.
- -Improved function annotation accuracy by 15% on benchmark set using PyTorch and HuggingFace Transformers.
Projects
Oracle – Research-Grade Forecasting Pipeline for Kalshi MarketsOpen →
A blind-forecasting pipeline for Kalshi prediction markets with leakage-safe research tools and calibrated backtesting.
Mizān – Local-First Personal Finance PlatformOpen →
Self-hosted finance app syncing bank/crypto accounts with AES-256-GCM credential encryption and zero telemetry.
LLM Agent Memory in Repeated Social DilemmasOpen →
How much memory do LLM agents really need to sustain cooperation in a repeated public-goods game?
Final project for 6.7960 - Deep Learning
Straggler-Aware Scheduler for Distributed TrainingOpen →
Persistence-filtered straggler detection and adaptive rate allocation for gradient synchronization.
Final project for 6.5820 - Computer Networks
Interplanetary Delay-Tolerant Network Protocol (MAUSA)Open →
Routing protocol design for deep-space communication with extreme latency and intermittent connectivity.
Final project for 6.1800 - Computer Systems Engineering
PPG-Based Heart Rate & Hydration MonitorOpen →
Non-invasive physiological monitoring using photoplethysmography signal analysis from video recordings.
Ambient AI Assistant (InvisibleGPT)Open →
Multi-modal input system with priority-based output routing for seamless AI interaction workflows.
Dual-Role Healthcare Platform (TeddyCare)Open →
Patient and doctor dashboards with wearable integration and fine-tuned GPT-4o for medical conversations.
Skills
Experience
Teaching Assistant for Computation Structures (6.1910)
MIT EECS
- -Teaching digital logic design, Verilog, and Minispec (Bluespec derivative) to 200+ students in weekly labs and office hours.
- -Debug student processors in real-time-pipelined CPUs, cache hierarchies, hazard detection-with average fix time under 10 minutes.
- -Release labs, write quizzes, and maintain course infrastructure (grading scripts, lab checkoff systems, debugging tools).
- -Help students understand not just how to write Verilog but why their designs work (or don't)-timing, synthesis, hardware intuition.
International Students Association President
MIT
- -Led MIT's largest cultural umbrella organization, representing 1000+ international students across 15+ cultural groups.
- -Organized 4 large-scale events with 300–1100 attendees each ($50k+ total budget): cultural showcases, networking mixers, orientation programs.
- -Designed coordination framework for 15+ organizations-shared calendars, budget allocation system, conflict resolution processes-now used campus-wide.
- -Shipped new constitution establishing clear governance structure, term limits, and transition protocols for future leadership.
- -Built mentor network connecting 200+ incoming international students with upperclassmen, faculty, and startup founders for career guidance.
AI Music Recommender (AIM Labs)
AI@MIT
- -Built Siamese network for music similarity on 10k+ track dataset in a selected collaborative team of five.
- -Optimized triplet loss training pipeline, improving recommendation accuracy from 60% to 78% in blind A/B tests with 50 users.
- -Integrated Spotify API for metadata retrieval and React frontend for user interaction.
Awards
🏆 33rd International Biology Olympiad – Iranian National Team
2022Gold Medal, ranked #7 globally among 300+ participants from 75+ countries in Yerevan, Armenia; practicals spanned PCR, gel electrophoresis, microscopy, plant anatomy, and ecological sampling.
🏆 23rd National Biology Olympiad
2020Gold Medal.
🏆 5th & 6th National Stem Cell and Regenerative Medicine Olympiad
2020, 2021Top 40 and Gold Medal.
🏆 5th & 7th National Brain Bee Neuroscience Competition
2019, 2021Bronze and Silver Medal.