---
title: Crowding Distance Truncation in NSGA-II
url: https://www.emergentmind.com/topics/crowding-distance-based-truncation
type: topic
---

# Crowding Distance Truncation in NSGA-II

Crowding distance–based truncation is a selection and diversity-maintaining mechanism central to the Non-dominated Sorting Genetic Algorithm II (NSGA-II) family of multi-objective evolutionary algorithms. It quantifies the isolation of a candidate solution in objective space to guide which solutions survive to the next generation when the number of non-dominated solutions exceeds available slots. Crowding distance–based truncation aims to balance convergence toward the Pareto front with maintenance of diverse, well-spread solutions, and has led to a sequence of refinements and theoretical analysis, including improved definitions and provably sound variations for many-objective settings [1811.12667][2407.17687][2504.17222].

## 1. Formal Definition of Crowding Distance–Based Truncation

Let $F$ be a non-dominated front of size $|F|$ under $m$ objectives. For each individual $j=1,\dots,|F|$ in $F$, denote its value on the $k$-th objective as $f_j^k$, with $f_{\min}^k$ and $f_{\max}^k$ the minimum and maximum values of $f^k$ over $F$. 

**Original NSGA-II Crowding Distance:**
- For each objective $k$, sort $F$ by $f^k$ in ascending order.
- Set boundary points (minimum and maximum in each objective) to have $d_j = +\infty$.
- For each interior point $j$ (with neighbors $j-1$ and $j+1$), update:
  $$
  d_j \leftarrow d_j + \frac{f^k_{j+1} - f^k_{j-1}}{f^k_{\max} - f^k_{\min}}
  $$
- The total crowding distance is the sum over all objectives.

**Improved Crowding Distance [1811.12667]:**
- Replace the symmetric span by a forward difference:
  $$
  d_j^{\mathrm{imp}} \leftarrow d_j^{\mathrm{imp}} + \frac{f^k_{j+1} - f^k_j}{f^k_{\max} - f^k_{\min}}
  $$
This biases the distance in favor of solutions closer to the Pareto front.

**Truthful Crowding Distance (tCD) [2407.17687]:**
- For each objective $i$, sort $S$ in descending order of $f_i$.
- For $j>1$, define the normalized $L_1$ distance between $S_{i.k}$ and $S_{i.j}$ as
  $$
  d(S_{i.k}, S_{i.j}) = \sum_{a=1}^m \frac{|f_a(S_{i.k}) - f_a(S_{i.j})|}{f_a(S_{a.1})-f_a(S_{a.N})}
  $$
- The per-objective tCD is the minimum over all earlier $k<j$ in the sorted list.
- Final tCD for $x$ is $+\infty$ if $x$ is a boundary solution for any objective; otherwise, tCD$(x) = \sum_{i=1}^m \mathrm{tCD}_i(x)$.

## 2. Algorithmic Structure of Truncation in NSGA-II

The truncation operator is invoked when the non-dominated fronts $F_1, F_2, \dots$ exceed the intended population size $N$. The next generation is filled by:
- Sequentially adding entire fronts until reaching a front $F_j$ that would overflow $N$.
- Computing and assigning crowding distances $d_j$ to all members of $F_j$.
- Sorting $F_j$ in descending $d_j$ (with $+\infty$ first).
- Choosing the $N - |\bigcup_{l=1}^{j-1} F_l|$ solutions from the top of this order.

Boundary solutions (extremes in any objective) are assigned $d=+\infty$, and tie-breaking among equal $d_j$ is typically random or by stable sort. The time complexity remains $O(mN \log N)$.

When using tCD, the only change is substitution of the crowding distance computation subroutine, with otherwise unchanged selection and sorting logic [2407.17687].

## 3. Theoretical Properties and Optimality Criteria

On linear Pareto fronts for two-objective problems, the crowding distance for an interior point $x_i$ is explicitly $d_i = 2(x_{i+1} - x_{i-1})$ [2504.17222]. The optimization problem thus becomes maximizing the minimum three-point spacing.

Theoretical analysis demonstrates that the uniform spacing $x_i = (i-1)/(\mu-1)$, while intuitive, does not maximize the minimum crowding distance. The true optimum corresponds to clustered overlap: with $\mu$ solutions, the best configuration arranges them in $\lceil \mu/2 \rceil$ clusters equally distributed along the front, with (for even $\mu$) two solutions per cluster. The minimum crowding distance achieved in this way is
$$
\Delta^* = \frac{2}{\lceil \mu/2 \rceil - 1}
$$
In contrast, the uniform distribution gives $\Delta_{\mathrm{uni}} = 4/(\mu-1)$, and analytic and empirical results confirm $\Delta^* > \Delta_{\mathrm{uni}}$ for all $\mu \geq 4$.

Table: Optimal vs. Uniform Minimum Crowding Distance on Linear Fronts

| Population ($\mu$) | Uniform $\Delta_{\mathrm{uni}}$ | Optimal $\Delta^*$ | Ratio $\Delta^* / \Delta_{\mathrm{uni}}$ |
|--------------------|--------------------------|------------------|-------------------------------|
| 4                  | $4/3$                    | $2$              | $1.5$                         |
| 6                  | $4/5$                    | $1$              | $1.25$                        |
| 8                  | $4/7$                    | $2/3$            | $1.167$                       |

## 4. Empirical Performance and Observed Distributions

Empirical studies show that the standard $(\mu+\mu)$ NSGA-II truncation often produces duplicated extreme points at the Pareto front boundaries due to ties, with quasi-random spread among interior points. The steady-state $(\mu+1)$ variant of NSGA-II, in which exactly one solution is replaced per iteration, yields nearly uniform spacing in the interior but still duplicates the two extremes. Neither variant achieves the clustered-overlap optimal configuration; their minimum crowding distance remains strictly suboptimal compared to the theoretical maximum [2504.17222].

In multi-objective benchmark problems, adoption of improved crowding distance [1811.12667] leads to consistently reduced Generalized Distance (GD) to the Pareto front and higher coverage as measured by the C-metric, without materially affecting distribution metrics such as SP (spacing) or $M_2$-star variance. The truthful crowding distance enables NSGA-II to avoid the exponential performance deterioration observed in classic crowding distance for many-objective problems, paralleling the provable efficiency of NSGA-III or SMS-EMOA [2407.17687].

## 5. Limitations and Variant-Driven Enhancements

Classic crowding distance considers only per-objective neighbor proximity and can falsely indicate high diversity even when entire objective vectors cluster. This decoupling is particularly problematic in many-objective contexts, leading to NSGA-II's exponential runtime scaling [2407.17687]. The truthful crowding distance (tCD) corrects this by detecting genuine closeness in full objective space and ensuring a diverse coverage, with population sizes equal to the Pareto set size.

Additionally, NSGA-II's truncation, which removes all solutions sharing the minimum crowding distance in a single batch without reassessing, cannot optimally maximize the minimum crowding distance as shown in [2504.17222]; removal of each candidate has non-local effects. A more sophisticated scheme—removing, at each step, the candidate whose absence most improves the minimum crowding distance—would, in principle, approach the optimal clustered-overlap pattern suggested by analytic arguments.

## 6. Connections to Diversity Metrics and Related EMO Algorithms

NSGA-II's crowding distance–based truncation does not correspond to an exact maximization of any global diversity metric such as hypervolume (SMS-EMOA), reference-line intersection (NSGA-III), or decomposition-based spread (MOEA/D) [2504.17222]. This absence of a global criterion distinguishes NSGA-II: unlike the aforementioned methods, its diversity preservation is a result of local isolation metrics rather than global optimality. Improved and truthful crowding distance definitions provide a pathway to formalizing this connection, especially in extending the foundational principles to higher-dimensional spaces and more demanding diversity requirements [1811.12667][2407.17687].

Source: https://www.emergentmind.com/topics/crowding-distance-based-truncation