Now: Research intern at Microsoft Research Montréal

Maryam Hashemzadeh

PhD candidate · Mila & Université de Montréal

I study how large language models generate text, act as agents and stay safe.

Decoded in 8 parallel steps · t = 0.00

I'm a PhD candidate at Mila and Université de Montréal, advised by Sarath Chandar and Marc-Alexandre Côté, and currently a research intern at Microsoft Research Montréal. I work on large language models and the agents built on them, including safety methods that keep models helpful, test-time scaling for coding agents and diffusion language models, and multi-token prediction. Previously, I was a student researcher at ServiceNow Research and did my M.Sc. on offline reinforcement learning at the University of Alberta and Amii.

Portrait of Maryam Hashemzadeh

News

Latest first

  • I'm co-organizing REALM, the Second Workshop for Research on Agent Language Models, at EMNLP 2026 in Budapest on October 29.

  • Dialectics of Alignment was accepted at NeurIPS 2026.

  • The FrogNano technical report is out. I'm a core contributor and worked on test-time scaling for the agent.

  • New preprint showing that probabilistic calibration is a trainable capability in language models.

  • New preprint, REAM, on merging experts to compress mixture-of-experts LLMs.

  • Started a research internship at Microsoft Research Montréal, working on coding agents.

  • Joined ServiceNow Research as a student researcher.

  • Started my PhD at Mila and Université de Montréal with Sarath Chandar, supported by a DIRO Excellence Scholarship.

Research

Current directions

Safety and alignment

Safety training that removes unsafe data or teaches refusals often leaves models overly cautious. I study how to keep that knowledge inside the model and control when it is used, and I'm now working on safety alignment for diffusion language models.

Coding agents

Small software-engineering agents that can run on modest hardware. I worked on test-time scaling for FrogNano, a 4B coding agent trained with reinforcement learning, and I'm working on context compaction for coding agents at Microsoft Research.

Diffusion and multi-token LMs

Language models that write many tokens at once, by denoising a whole sequence or by predicting several tokens per step. I study test-time scaling for diffusion language models and the noise structure of continuous diffusion LMs, and I'm benchmarking multi-token prediction methods and their scaling laws.

  • Test-time scaling for diffusion LMs · under review
  • Noise structure of continuous diffusion LMs · ongoing
  • Multi-token prediction benchmark · ongoing

Efficient, calibrated LLMs

Making large models cheaper to run and more reliable. This includes compressing mixture-of-experts models by merging experts, and training models to sample from the distributions users ask for.

Earlier work

I've also worked on small language agents that learn sub-goals from an LLM (CoLLAs 2024 oral), on faster reinforcement learning by generalizing across state subspaces (TNNLS, Evolving Systems), and on how brains and neural networks represent language and value (EMNLP, eLife).

Publications

10 papers · Google Scholar

2026

  • Dialectics of Alignment: Harnessing Unsafe Knowledge for Dynamic Safety Routing

    Maryam Hashemzadeh, Jerry Huang, Minseon Kim, Marc-Alexandre Côté, Sarath Chandar

    SafeMoE keeps unsafe knowledge in separate experts and learns, from as few as 100 examples, when to route to them, giving answers that are safer and more informative than standard alignment baselines.

    NeurIPS 2026 arXiv
  • FrogNano: Training a 4B Coding Agent via Online Task Synthesis

    Minseon Kim, Zhengyan Shi, Emiliano Penaloza, Christopher Cui, Roger Creus Castanyer, Maryam Hashemzadeh, Isadora White, Jonathan Light, Jeonghye Kim, Matheus Pereira, Darya Moldavskaya, Chinmay Singh, Fabio Vera, Baolin Peng, Xingdi Yuan, Marc-Alexandre Côté, Alessandro Sordoni

    A 4B-parameter coding agent trained only with reinforcement learning, on tasks synthesized online to match what the current model can learn.

    Technical report Core contributor · test-time scaling arXiv
  • Probabilistic Calibration Is a Trainable Capability in Language Models

    Davide Baldelli, Sruthi Kuriakose, Maryam Hashemzadeh, Amal Zouaq, Sarath Chandar

    Fine-tuning on synthetic sampling tasks teaches language models to follow requested randomness, and the skill carries over to unseen distributions and open-ended generation.

    Preprint arXiv Code
  • REAM: Merging Improves Pruning of Experts in LLMs

    Saurav Jha, Maryam Hashemzadeh, Ali Saheb Pasand, Ali Parviz, Min-Joong Lee, Boris Knyazev

    Merging experts gives better compressed mixture-of-experts LLMs than pruning them.

    Preprint arXiv

2024

  • Sub-goal Distillation: A Method to Improve Small Language Agents

    Maryam Hashemzadeh, Elias Stengel-Eskin, Sarath Chandar, Marc-Alexandre Côté

    Distills an LLM's planning into a 770M-parameter hierarchical agent that needs no LLM calls at inference and beats imitation learning by 16.7 points on ScienceWorld.

    CoLLAs 2024 Oral PMLR arXiv Code
  • Exploring Plasticity of Neural Network for NLP Tasks in Continual Learning

    Maryam Hashemzadeh, Pranshu Malviya, Darshan Patil, Sarath Chandar

    CoLLAs 2024 Workshop

2021

  • Value Signals Guide Abstraction during Learning

    Aurelio Cortese, Asuka Yamamoto, Maryam Hashemzadeh, Pradyumna Sepulveda, Mitsuo Kawato, Benedetto De Martino

    fMRI and neurofeedback experiments show that value signals guide which abstract representations people use as they learn.

    eLife Paper

2020

2018

Experience

2018 – now

  1. Mar 2026 – nowIndustry

    Research Intern

    Microsoft Research · Montréal

    On the Froggy team, working on coding agents, including test-time scaling for FrogNano and context compaction for coding agents.

  2. Jul 2025 – Mar 2026Industry

    Student Researcher

    ServiceNow Research · Montréal

    Designing web agents. Mentor: Nicolas Gontier.

  3. Jan 2024 – nowDegree

    PhD, Computer Science

    Mila & Université de Montréal

    Advisors: Sarath Chandar and Marc-Alexandre Côté.

  4. Sep 2022 – Dec 2023Research

    Associate Researcher, LLMs

    Mila – Quebec AI Institute · Montréal

    Language-based agents.

  5. Sep 2021 – Aug 2022Research

    Associate Researcher, ML & RL

    Amii · Edmonton

    Offline reinforcement learning.

  6. Jan 2019 – Aug 2021Degree

    M.Sc., Computing Science

    University of Alberta & Amii · Edmonton

    Advisors: Alona Fyshe and Martha White.

  7. Jun 2018 – Dec 2018Research

    Research Intern

    ATR · Kyoto, Japan

    Modelling EEG data with reinforcement learning, with Aurelio Cortese.

  8. Jun – Jul 2018Summer school

    Computational & Cognitive Neuroscience Summer School

    Cold Spring Harbor Asia · Suzhou, China

Honors & service

Awards and community

Scholarships & awards

  • FRQNT Scholarship, CAD 75,0003 yearsFonds de recherche du Québec – Nature et technologies
  • DIRO Excellence Scholarship2024 – 2026Université de Montréal
  • Full PhD funding2024 – nowMila – Quebec AI Institute
  • PhD tuition exemption scholarship2024 – nowUniversité de Montréal
  • Full M.Sc. funding2019 – 2021University of Alberta

Service & community

  • Organizer2026REALM, Second Workshop for Research on Agent Language Models, EMNLP 2026
  • Organizing committee2022, 2023, 2025Conference on Lifelong Learning Agents (CoLLAs)
  • Reviewer2020 – nowICML, NeurIPS, ICLR, IEEE Transactions on Neural Networks and Learning Systems
  • Tutorial developer and TA2020, 2021Neuromatch Academy summer school
  • Tutorial developer2021Amii Work-Integrated Learning Opportunity, online machine learning courses
  • Mentor2021Coursera reinforcement learning course by Martha White and Adam White
  • School mentor2024Summer computer science program for under-represented youth, Montréal
  • Volunteer2019NeurIPS 2019, Vancouver

Hobbies

When I'm not programming, I spend my time with my sweetheart, Saleh, whose way of understanding the world never stops amazing me. In summer I enjoy playing tennis, badminton and volleyball, and in winter I go skiing and ice skating. I also love art, and whenever I have time I paint with pastels.

Maryam and Saleh on the London Eye

Languages

I speak Farsi (native), English (full professional proficiency) and French (intermediate).

Contact

The best way to reach me is by email.