Fair Modularity Optimization (FairFN)
- The paper introduces a fairness–modularity metric (Q^P) that quantifies statistical parity by comparing group distributions within communities.
- It presents algorithmic realizations like FairFN and MOUFLON, using bi-objective optimization to balance traditional modularity with fairness constraints.
- Empirical evaluations on synthetic and real-world networks show that FairFN achieves near-optimal fairness with competitive structural quality.
Fair Modularity Optimization (FairFN) is a principled approach to community partitioning in graphs that enforces statistical fairness for protected demographic groups while optimizing structural quality as measured by modularity. Unlike traditional modularity maximization, which may produce highly unrepresentative or biased clusters regarding the distribution of protected groups, FairFN operationalizes proportional group representation through a fairness-modularity metric, yielding partitions that are provably fair and competitive in structural quality. The framework encompasses both bi-objective formulations and algorithmic realizations such as Fair Fast Newman (FairFN) and multilevel scalable solvers exemplified by MOUFLON, enabling practical application to synthetic and real-world networks with challenging size and balance properties (Wang et al., 27 May 2025, Panayiotou et al., 14 Oct 2025).
1. Fairness–Modularity Metric: Theoretical Foundations
At the core of FairFN is the fairness–modularity metric, , defined on a network with nodes and disjoint protected groups partitioning . Building on the conventional Newman–Girvan modularity, FairFN introduces a protected-group network , whose adjacency matrix is block-diagonal, with blocks of all ones corresponding to each . The degree vector and 0 characterize 1.
Given a partition encoded by 2, the fairness–modularity is: 3 where 4. Expanding,
5
with 6 counting nodes from 7 assigned to community 8.
A central property (Fairness Characterization Theorem) is: 9 i.e., exactly when each community represents protected groups in proportion to their global prevalence. Thus, minimizing 0 enforces statistical parity. The plausible implication is that 1 provides both a penalty and a certificate for group-proportional clustering.
2. Optimization Framework: Bi-Objective and Scalarized Formulations
Community detection with fairness constraints under FairFN becomes an inherently bi-objective problem:
- maximize classic modularity 2 for structural quality,
- minimize 3 for fairness.
Formally, this yields: 4 or, scalarized,
5
In this setup, 6 or 7 controls the trade-off between fairness and structure. Both 8 and 9 are combinatorial and make optimal partitioning NP-hard. Greedy modularity-based methods are therefore adapted, augmented with fairness-modularity compliance or penalty checks at each iterative step (Wang et al., 27 May 2025, Panayiotou et al., 14 Oct 2025).
3. Algorithmic Realizations
Fair Fast Newman (FairFN)
FairFN modifies the classic Fast Newman (FN) greedy merging procedure:
- Each node starts as its own community.
- For each pair 0, compute modularity increments 1 and fairness–modularity increments 2.
- At each step, among pairs with 3 and 4, merge the pair with maximum 5.
- Stop when no such merge remains.
This one-line modification—filtering merges through 6—enforces non-increasing unfairness. The algorithm exhibits complexity 7 in time and 8 space per run, with practical data structure optimizations reducing overhead (Wang et al., 27 May 2025).
MOUFLON: Scalable Louvain-Style Optimization
MOUFLON implements FairFN in a multilevel Louvain-style framework for large-scale graphs and multi-group settings (Panayiotou et al., 14 Oct 2025). The method proceeds in repeated two-phase passes per graph level:
- Phase 1: Pure modularity maximization (local node moves).
- Phase 2: Joint optimization of 9, where 0 is a proportional-balance fairness metric (responsive to multi-group and imbalance).
- Super-node aggregation and reiteration on the induced graph. Termination occurs when 1 gain falls below threshold 2.
MOUFLON achieves running time 3 empirically (for up to 4 nodes), with 5 space for maintaining group counts.
4. Evaluation: Datasets, Metrics, and Comparative Performance
Experiments in (Wang et al., 27 May 2025) and (Panayiotou et al., 14 Oct 2025) cover synthetic (LFR, ER, Gaussian blobs, rewired cliques) and real tabular and network datasets (e.g., Adult, Bank, Census1990, Creditcard, Facebook, Deezer, Twitch, Pokec). Protected attributes span gender, marital status, age, etc., with controlled balance or severe group size skew.
Metrics include:
- Modularity 6 (structural quality; higher is better),
- Fairness–modularity 7 (lower is better),
- Fairness ratio FR = 8,
- Average Wasserstein distance (AWD) between local and global group distributions,
- Proportional-balance metric 9 (for multi-group fairness),
- NMI to ground-truth (in synthetic settings).
Key findings:
- FairFN rapidly drives 0, achieving FR1 and AWD2 while incurring only a small decrease in modularity 3 relative to FN.
- On highly imbalanced synthetic settings, FairFN attains FR4 and AWD5; state-of-the-art competitors plateau at FR6–7, AWD8.
- On real-world datasets, FairFN consistently yields near-optimal fairness (FR9), low 0, and modularity close to or exceeding that of unconstrained methods.
- MOUFLON produces a continuous Pareto front by tuning trade-off parameter 1, achieving scalable (up to over 2M nodes) and flexible performance; for mid-range 3, modularity remains 4 and proportional-fairness 5.
A comparative summary is as follows:
| Method | Fairness Constraint | Modularity 6 | Fairness (FR/7/F) | Scalability |
|---|---|---|---|---|
| FN | None | High | Low | 8 |
| FairFN | 9 | High | High (provable) | 0 |
| MOUFLON | 1 | Flexible | Flexible/High | 2 |
5. Practical Insights, Hyperparameter Choices, and Trade-Offs
In both FairFN and MOUFLON, fairness–modularity and proportional-fairness metrics provide tunable levers. The key hyperparameter is:
- 3 (in merge thresholding or Louvain-like passes): small 4 enforces strict fairness (5), larger 6 relaxes fairness in exchange for possible modularity gains. Empirical guidance suggests setting 7 just above 8 for convergence; in MOUFLON, 9 delivers stable results, while mission-critical fairness may require 0.
For multi-group and highly imbalanced data, proportional-balance 1 should always be used; naive balance metrics can mask true disparities and produce degenerate solutions.
6. Limitations and Future Directions
The FairFN framework offers a suite of advantages but remains subject to scalability and theoretical challenges:
- The 2 complexity of classic FairFN is nontrivial for 3; however, the fairness-filter concept integrates with scalable algorithms like Louvain and CNM.
- Both FairFN and MOUFLON rely on greedy merging; local maxima may require global moves or refinement such as Kernighan–Lin.
- Current fairness metrics assume proportional representation and single sensitive attributes; extensions to overlapping, dynamic communities, and intersectional fairness are open.
- Scaling beyond millions of edges may require low-level or external-memory implementations.
A plausible implication is that continued development will focus on integrating fairness guarantees into high-throughput modularity frameworks, exploring richer notions of null models, and addressing intersectional and temporal fairness in evolving networks (Wang et al., 27 May 2025, Panayiotou et al., 14 Oct 2025).