# Improving Residency Matching Through Computational Optimization

**Authors:** Yue Wu, Cecilia S. Lee, Aaron Y. Lee, Russell N. Van Gelder

PMC · DOI: 10.1001/jamanetworkopen.2025.17077 · JAMA Network Open · 2025-06-23

## TL;DR

A new algorithm for matching medical residents to programs outperforms the traditional Gale-Shapley method by better aligning top choices for both applicants and programs.

## Contribution

A mixed-integer linear optimization algorithm is proposed to improve residency matching outcomes compared to the 50-year-old Gale-Shapley method.

## Key findings

- The new algorithm improved the mean rank of matches for applicants and programs compared to Gale-Shapley.
- 78.4% of applicants matched to one of their top 3 choices with the new algorithm, compared to 70.9% with Gale-Shapley.
- The new algorithm reduced unfilled residency positions and improved couple matching success.

## Abstract

Can the currently used Gale-Shapley residency match algorithm be improved to ensure more applicants and more programs match their top choices?

Using a mixed-integer linear optimized algorithm with historical match list data from 2011 to 2021 for a total of 6990 applicants (635.5 applicants per year) and a mean of 114.6 programs per year, this quality improvement study found that the mean rank of programs for applicants was 2.40 using the residency optimizer, compared with 2.85 using Gale-Shapley; similarly, the mean rank of applicants for programs was 2.65 for the residency optimizer and 2.97 for Gale-Shapley. The residency optimizer consistently matched 5% to 10% more applicants to their top 3 ranked programs than Gale-Shapley.

These findings suggest that the Gale-Shapley algorithm produces a stable-marriage match, whereas the residency optimizer improves the match so that more applicants and programs match their top ranked counter-parties; thus, consideration should be given to updating residency match algorithms.

This quality improvement study compares the performance of a mixed integer linear optimization-based approach against the currently used algorithm for matching applicants to medical residency programs.

In the US, tens of thousands of medical student applicants and residency programs rank each other annually. The matching algorithm, Gale-Shapley, has been relatively unchanged for over 50 years, and although it results in a stable solution for the match, where no applicant and program would prefer to be matched together than to their assigned match, it does not optimize the overall match result.

To compare the performance of a mixed-integer linear optimization-based approach, the residency optimizer, for matching and against the currently used Gale-Shapley algorithm.

This quality improvement study used anonymized rank lists and match data for ophthalmology residency matches conducted between 2011 to 2021. The Gale-Shapley algorithm and the residency optimizer were compared for overall performance for both applicants and programs, under both unlimited choice rank lists and capitated lists. The algorithms were also compared for couple matching. Final data analyses were performed in April 2025.

Matching with an ophthalmology residency and fellowship.

Algorithm performance was compared in terms of mean matched rank of applicants and programs, as well as the percentage of applicants matching their top 3 ranked programs. For the capped rank list experiments, the percentage of positions filled and the percentage of applicants matching their top choices were measured. For couple matching, the percentage of couples matched was computed.

For a total of 6990 applicants (635.5 applicants per year) and a mean of 114.6 programs per year from 2011 to 2021, applicants matched 0.45 rank positions better (2.40 using the optimized algorithm vs 2.85 using Gale-Shapley), and the program matched applicants 0.32 rank positions better (2.65 for the optimized algorithm vs 2.97 for Gale-Shapley) per position under residency optimizer match than under Gale-Shapley. In total, 78.4% of applicants (4079 of 5200 applicants) matched to 1 of their top 3 choices with the residency optimizer match compared with 70.9% (3668 of 5174 applicants) with the Gale-Shapley algorithm. The residency optimizer eliminated unfilled residency positions and resulted in a mean of 2.4 fewer programs with unfilled slots annually. The residency optimizer outperformed the Gale-Shapley algorithm with truncated match lists and outperformed Gale-Shapley in successfully matching couples.

These findings suggest that alternate match algorithms optimizing global utility may generally improve residency and fellowship match outcomes.

## Full-text entities

- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12186513/full.md

## Figures

4 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12186513/full.md

## References

11 references — full list in the complete paper: https://tomesphere.com/paper/PMC12186513/full.md

---
Source: https://tomesphere.com/paper/PMC12186513