Create and explore imaginative 3D worlds with our new product Dreamfield (opens in a new tab)
Papers
Topics
Authors
Recent
Search
2000 character limit reached

Fair Modularity Optimization (FairFN)

Updated 11 June 2026
  • 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, QPQ^P, defined on a network G=(V,E)G=(V,E) with n=∣V∣n=|V| nodes and rr disjoint protected groups P1,…,PrP_1,\ldots,P_r partitioning VV. Building on the conventional Newman–Girvan modularity, FairFN introduces a protected-group network GPG^P, whose adjacency matrix DD is block-diagonal, with blocks of all ones corresponding to each PwP_w. The degree vector KPK^P and mP=12∑w=1r∣Pw∣2m^P=\frac12\sum_{w=1}^r |P_w|^2 characterize GPG^P.

Given a partition encoded by S∈{0,1}n×kS\in\{0,1\}^{n\times k}, the fairness–modularity is: QP=12mP Tr(STBPS)Q^P = \frac{1}{2m^P}\,\mathrm{Tr}(S^T B^P S) where BP=D−12mPKP(KP)TB^P = D - \frac{1}{2m^P} K^P (K^P)^T. Expanding,

QP=12mP∑u=1k∑w=1r∣Cu∩Pw∣2−1(2mP)2∑u=1k(∑w=1r∣Cu∩Pw∣∣Pw∣)2Q^P = \frac{1}{2m^P} \sum_{u=1}^k \sum_{w=1}^r |C_u \cap P_w|^2 - \frac{1}{(2m^P)^2} \sum_{u=1}^k \left( \sum_{w=1}^r |C_u \cap P_w| |P_w| \right)^2

with ∣Cu∩Pw∣|C_u \cap P_w| counting nodes from PwP_w assigned to community CuC_u.

A central property (Fairness Characterization Theorem) is: QP≥0 always, and QP=0  ⟺  ∣Cu∩Pw∣∣Cu∣=∣Pw∣n, ∀u,w,Q^P \geq 0 \text{ always, and } Q^P = 0 \iff \frac{|C_u \cap P_w|}{|C_u|} = \frac{|P_w|}{n},\ \forall u, w, i.e., exactly when each community represents protected groups in proportion to their global prevalence. Thus, minimizing QPQ^P enforces statistical parity. The plausible implication is that QPQ^P 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 QQ for structural quality,
  • minimize QPQ^P for fairness.

Formally, this yields: max⁡S Q(S)subject to QP(S)≤ϵ\max_{S}\ Q(S) \quad \mathrm{subject~to}~ Q^P(S) \leq \epsilon or, scalarized,

max⁡SQ(S)−λQP(S),λ≥0\max_S Q(S) - \lambda Q^P(S),\quad \lambda \geq 0

In this setup, λ\lambda or ϵ\epsilon controls the trade-off between fairness and structure. Both QQ and QPQ^P 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 (i,j)(i,j), compute modularity increments ΔQij\Delta Q_{ij} and fairness–modularity increments ΔQijP\Delta Q^P_{ij}.
  • At each step, among pairs with ΔQij>−α/(2m)\Delta Q_{ij} > -\alpha/(2m) and ΔQijP<0\Delta Q^P_{ij} < 0, merge the pair with maximum ΔQij\Delta Q_{ij}.
  • Stop when no such merge remains.

This one-line modification—filtering merges through ΔQijP<0\Delta Q^P_{ij} < 0—enforces non-increasing unfairness. The algorithm exhibits complexity O(n(m+n))O(n(m+n)) in time and O(n2)O(n^2) 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 Jα(P)=αQ(P)+(1−α)F(P)J_\alpha(P) = \alpha Q(P) + (1-\alpha) F(P), where F(P)F(P) is a proportional-balance fairness metric (responsive to multi-group and imbalance).
  • Super-node aggregation and reiteration on the induced graph. Termination occurs when JαJ_\alpha gain falls below threshold θ\theta.

MOUFLON achieves running time O(mlog⁡n)O(m\log n) empirically (for up to 10610^6 nodes), with O(Kn)O(Kn) 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 QQ (structural quality; higher is better),
  • Fairness–modularity QPQ^P (lower is better),
  • Fairness ratio FR = min⁡umin⁡w{r(u,w)/r(w),r(w)/r(u,w)}∈[0,1]\min_u \min_w \big\{ r(u,w)/r(w), r(w)/r(u,w) \big\} \in [0,1],
  • Average Wasserstein distance (AWD) between local and global group distributions,
  • Proportional-balance metric F(P)F(P) (for multi-group fairness),
  • NMI to ground-truth (in synthetic settings).

Key findings:

  • FairFN rapidly drives QP→0Q^P \to 0, achieving FR→1\to 1 and AWD→0\to 0 while incurring only a small decrease in modularity QQ relative to FN.
  • On highly imbalanced synthetic settings, FairFN attains FR≈0.99\approx 0.99 and AWD≈0.002\approx 0.002; state-of-the-art competitors plateau at FR=0.6=0.6–$0.9$, AWD≈0.01\approx 0.01.
  • On real-world datasets, FairFN consistently yields near-optimal fairness (FR→1\to 1), low QPQ^P, and modularity close to or exceeding that of unconstrained methods.
  • MOUFLON produces a continuous Pareto front by tuning trade-off parameter α\alpha, achieving scalable (up to over $1$M nodes) and flexible performance; for mid-range α\alpha, modularity remains ≥0.7\geq 0.7 and proportional-fairness Fprop≥0.9F_\mathrm{prop}\geq 0.9.

A comparative summary is as follows:

Method Fairness Constraint Modularity QQ Fairness (FR/QPQ^P/F) Scalability
FN None High Low O(n(m+n))O(n(m+n))
FairFN QPQ^P High High (provable) O(n(m+n))O(n(m+n))
MOUFLON FpropF_\mathrm{prop} Flexible Flexible/High O(mlog⁡n)O(m\log n)

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:

  • α\alpha (in merge thresholding or Louvain-like passes): small α\alpha enforces strict fairness (QP→0Q^P \to 0), larger α\alpha relaxes fairness in exchange for possible modularity gains. Empirical guidance suggests setting α\alpha just above 2mmax⁡ijΔQij2m \max_{ij} \Delta Q_{ij} for convergence; in MOUFLON, α∈[0.4,0.7]\alpha \in [0.4, 0.7] delivers stable results, while mission-critical fairness may require α≤0.3\alpha \leq 0.3.

For multi-group and highly imbalanced data, proportional-balance FpropF_\mathrm{prop} 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 O(n(m+n))O(n(m+n)) complexity of classic FairFN is nontrivial for n≫105n \gg 10^5; 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).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Fair Modularity Optimization (FairFN).