arXiv:2609.02354cs.GTSep 2026

Manuscript Offprint

arXiv:2609.02354

Fair Stable Matching: A Nash Social Welfare Approach

Parth Desai, Rasheed M, Ganesh Ghalme, Sujit Gujar

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

A PREPRINT

Rasheed

Machine Learning Lab

IIIT Hyderabad

Hyderabad, India

mohammad.ahmed@research.iiit.ac.in

Parth Desai

Machine Learning Lab

IIIT Hyderabad

Hyderabad, India

parth.desai@research.iiit.ac.in

Ganesh Ghalme

Department of AI

IIIT Hyderabad

Hyderabad, India

ganeshghalme@ai.iith.ac.in

Sujt Gujar

Machine Learning Lab

IIIT Hyderabad

Hyderabad, India

sujit.gujar@iiit.ac.in

September 3, 2026

ABSTRACT

While traditional stable matching algorithms, such as the Gale-Shapley algorithm, prioritize stability, they may fall short of achieving equitable outcomes among participants. We study the role of Nash social welfare (NSW) as a fairness objective in the classic stable marriage problem. We develop SNSW-Alg that finds a stable matching that maximizes Nash social welfare under rank-induced utilities in O(n4)\mathcal{O}(n^4) time, where nn is the number of men or women. We demonstrate that SNSW-Alg balances equity while preserving stability. We empirically evaluate our methods across diverse preference distributions, demonstrating significant gains in fairness without substantial losses in other key measures such as regret, egalitarian criterion, and sex equality. Our findings suggest that the stable matching produced by SNSW-Alg is statistically Pareto-undominated by stable matchings based on other fairness measures - regret, egalitarian, and sex equality. This study offers compelling insights for designing fair-stable matching.

1 Introduction

Matching markets are economic settings where agents are paired based on preferences and compatibility. Unlike many economic markets, these do not rely on price signals for allocation. Instead, structured mechanisms determine who matches with whom, taking into account the preferences of both sides (e.g., students and colleges [Gale and Shapley, 1962], workers and firms [Revilla, 2007], organ donors and recipients [Roth et al., 2004]). Matching theory has two main branches: (i) Matching with transferable utility, where utility is transferable among agents (usually involving monetary transfers), and (ii) Matching with non-transferable utility, where transfers aren't possible (e.g., school admissions, organ donations). In this paper, we study the stable marriage problem which falls under the non-transferable utility setting.

Fairness in Matchings. The stable marriage problem involves two (most often equally sized) groups - typically referred to as men and women - in which each individual seeks to match with a member of the opposite group based on personal preferences. A central concept in the stable marriage problem is stability. A matching is stable if there are no blocking pairs - that is, no unmatched man and woman who would both prefer each other over their assigned partners. Stability is critical because unstable matchings are inherently fragile and prone to collapse, as participants may have incentives to deviate from the outcome. The celebrated Gale-Shapley algorithm [Gale and Shapley, 1962] outputs a stable matching which is optimal for the proposing side.

A PREPRINT

The male-optimal matching gives every man the best partner he could have in any stable matching. However, this often comes at the expense of the other side; it is highly unfair to women, who receive their least-preferred partners amongst all stable matchings. Conversely, running the algorithm with women proposing yields the female-optimal and male-pessimal outcome. This inherent asymmetry highlights a tension between stability and fairness, sparking a vast literature on improving equity and efficiency in practical matching mechanisms.

Existing approaches for Fair Matching. There have been studies on various alternative criteria for improving fairness and social welfare in stable matchings. The egalitarian stable matching [Irving et al., 1987] minimizes the total sum of ranks (i.e., how far down each partner is in their preference list), promoting overall satisfaction. As we show later, the egalitarian approach may sometimes offer a very good match to the majority at the cost of some agents receiving very poor matches. To balance such situations, the minimum-regret stable matching [Gusfield, 1987] minimizes the worst individual dissatisfaction, ensuring that the least-satisfied participant is as well off as possible. The sex equal stable matching [Kato, 1993] minimizes the difference between the sum of men's ranks and the sum of women's ranks, focusing on minimizing the disparity across the two sides. These refinements offer ways to balance efficiency and equity while maintaining stability. However, each measure optimizes some aspect of the agents; overall, to improve fairness across all agents, we believe a new approach is warranted.

Our Approach. We propose to maximize a suitably defined Nash social welfare (NSW) objective over the set of all stable matchings. Note that, if we ignore stability and capacity constraints, maximizing NSW is, in general, an NP-hard problem [Jain and Vaish, 2024]. However, under stability and capacity constraints (where each agent wants to match with exactly one agent), the problem assumes a special structure. By building upon the rotation poset framework introduced in [Irving et al., 1987], we can design an efficient algorithm to optimize NSW while preserving stability. Irving et al. [1987] constructs a capacitated directed graph based on the preferences and rotation posets of stable matchings for optimizing the additive egalitarian criterion. A challenge in our case was addressing the gap between the non-linear NSW criterion and the additive rotation poset framework. We bridge this gap by converting the NSW criterion into an equivalent additive objective. Our key idea is to appropriately adjust the edge weights in the graph to maximize NSW. However, it poses another challenge - we need a max-flow algorithm, and our weights are no longer integral, as in [Irving et al., 1987]. We then propose using Dinic's algorithm [Dinitz, 2006] with dynamic trees by [Sleator and Tarjan, 1981] rather than Ford-Fulkerson, as proposed by Irving et al. [1987]. We prove that our updated formulation enables SNSW-Alg to compute a stable matching that maximizes NSW in polynomial time, specifically within a time complexity of O~(n4)\tilde{O}(n^4). To evaluate the effectiveness of our approach in achieving fairness, we conduct an empirical study comparing three stable matching algorithms: (i) one that minimizes the sum of ranks (egalitarian), (ii) one that minimizes the worst rank (minimum regret), and (iii) one that minimizes the differences across the two sides (sex equal). Across various distributions of preference profiles, our experiments demonstrate that SNSW-Alg is statistically Pareto undominated among the four methods in most measured dimensions, highlighting its strong performance in balancing fairness and efficiency.

Our Contributions. Our contributions in this work are as follows.

(i) To the best of our knowledge, we are first to propose a novel objective for the stable marriage problem: maximizing Nash social welfare (NSW) over the space of stable matchings, balancing fairness and efficiency.

(ii) Toward this, we propose a polynomial-time algorithm SNSW-Alg.

(iii) We conduct an extensive empirical evaluation across diverse preference distributions, comparing four stable matching objectives.