Edge Wasserstein Loss in Object Detection
- Edge Wasserstein Distance Loss is a regression loss that represents an oriented box as a probability distribution over its edges to capture geometric boundaries.
- It employs an analytic closed-form formulation to tackle angle periodicity and the ambiguity between box width and height, ensuring smoother optimization.
- Empirical comparisons on DOTA with RetinaNet and S2ANet show improved performance on strict localization metrics compared to traditional L1-based methods.
Searching arXiv for the cited paper and closely related Wasserstein-loss work to ground the article. Edge Wasserstein Distance Loss (EWD loss) is a regression loss for oriented object detection that represents a predicted oriented bounding box as a distribution supported on its four edges and measures discrepancy to a target box by a Wasserstein distance on that edge-based representation. It was introduced to address the metric discontinuity induced by angle periodicity and the ambiguity of width–height definition in oriented box regression, and to alleviate the square-like problem that affects direct parameter losses such as -distance loss and its variants. In the formulation reported for oriented boxes, the resulting distance admits an analytic closed form in terms of the box center and the oriented width and height vectors, and the same edge-based construction is presented as extensible to quadrilateral and polynomial regression scenarios (Zhu et al., 2023).
1. Problem setting and motivation
The relevant prediction target is an oriented bounding box, written as
where is the box center, are width and height, and is the orientation angle. In this parameterization, two different parameter tuples can describe the same geometry. The reported examples are the periodicity of the angle and the ambiguity produced by swapping width and height together with a rotation. Under direct parameter regression, geometrically similar boxes can therefore be far apart in parameter space, producing a metric-discontinuous optimization landscape (Zhu et al., 2023).
The paper identifies two coupled failure modes. The first is angle periodicity. The second is the square-like problem, which becomes severe when : the distinction between width direction and height direction becomes ambiguous, rotating by approximately while swapping and changes little in geometry, yet the parameter tuple changes sharply. The claim is not merely that 0-style losses are noisy, but that they are misaligned with the geometry of oriented rectangles.
The motivation for a distribution-based formulation follows prior work such as GWD, KLD, and KFIoU, which represent an oriented box by a distribution rather than by raw parameters. EWD differs from those Gaussian-based formulations by putting probability mass only on the box edges. In that sense, the defining structure of the object is treated as its boundary rather than as a smooth interior surrogate.
2. Edge-supported representation of oriented boxes
The EWD construction begins from an oriented box representation 1, together with an oriented center point 2, width vector 3, height vector 4, and edge-center points 5. In clockwise order, the four edge centers are
6
This identifies the box with four edge elements whose positions are determined by the center and the oriented side vectors (Zhu et al., 2023).
The distinctive probabilistic step is that the probability density function is only nonzero over the edges. The appendix describes two variants. In the edge Gaussian view, each edge is represented by a Gaussian supported along the edge direction. In the edge dense view, points on an edge are modeled as
7
where 8 is the edge center, 9 is the edge vector, and 0 is drawn from a density 1 that is axially symmetric around the edge center. The symmetry condition is
2
and the associated variance is
3
This representation makes the comparison object the edge geometry itself. The paper’s stated rationale is that oriented boxes are better compared through the positions and orientations of their edges than through unstable angle coordinates.
3. Wasserstein formulation and analytic closed forms
For a single edge pair in the Gaussian-edge model, the appendix gives the 4-Wasserstein distance
5
The edge covariance is
6
with
7
The appendix then simplifies the trace term to
8
so that
9
For a single edge pair, the loss therefore depends on edge-center displacement and edge-vector mismatch (Zhu et al., 2023).
At the box level, summing the four edge contributions yields the edge Gaussian Wasserstein distance
0
The more general edge dense Wasserstein derivation starts from
1
and gives the final oriented-box expression
2
This is the central closed form for EDWD. The ground metric is squared Euclidean distance in the image plane, and no numerical optimal-transport solver is required in the reported OBox formulation.
4. Geometric consequences and relation to prior box losses
A notable feature of the closed forms is that the distance is expressed through 3, 4, and 5, rather than through a separate penalty on raw angle difference. For a single edge pair, the simplified form depends on 6 and 7; at the box level, the distance reduces to weighted quadratic discrepancies in the center and the oriented side vectors. This is the formal basis for the claim that EWD alleviates the metric discontinuity and the square-like problem (Zhu et al., 2023).
The comparison with Gaussian-based losses is structural. GWD and related methods represent an oriented box by a Gaussian over the box interior, whereas EWD uses a distribution whose probability density function is only nonzero over the edges. This suggests a closer alignment between the loss and the boundary geometry of a rectangle. The paper does not formulate this as a universal dominance claim over all Gaussian-based objectives, but it does explicitly position EWD as an alternative to interior-distribution surrogates.
The same edge representation is stated to generalize beyond oriented rectangles. The abstract and technical summary both report extension to quadrilateral and polynomial regression scenarios. The supplied derivations are detailed for OBoxes, while the quadrilateral and polynomial cases are presented at the level of generalization claims rather than full closed-form formulas.
5. Empirical behavior in oriented object detection
The appendix reports experiments on DOTA with RetinaNet and S2ANet under longer training, specifically 36 epochs. The authors note that longer training improves performance overall and narrows many performance gaps. They also state that GWD and KLD can become inferior to the 8 baseline in mAP, whereas EDWD still improves performance, especially at stricter localization metrics such as AP75 and AP50:95 (Zhu et al., 2023).
| Detector | Loss | AP50 / AP75 / AP50:95 |
|---|---|---|
| RetinaNet | 9 | 70.3 / 45.5 / 43.5 |
| RetinaNet | EDWD | 70.5 / 46.5 / 44.0 |
| S2ANet | 0 | 73.0 / 47.1 / 44.8 |
| S2ANet | EDWD | 73.5 / 48.5 / 45.5 |
For RetinaNet, the full comparison reported in the appendix is: 1 at 2, GWD at 3, KLD at 4, and EDWD at 5. For S2ANet, the corresponding numbers are 6, 7, 8, and 9. The repeated pattern emphasized in the supplied summary is the advantage of EDWD on the stricter localization criteria.
The paper also presents EGWD and EDWD as two edge-distribution variants. The appendix formulas make both explicit, but the longer-training comparison quoted in the supplied material highlights EDWD.
6. Terminological scope and neighboring Wasserstein-loss constructions
In the literature summarized here, “Edge Wasserstein Distance Loss” is specific to the oriented-object-detection method of “Edge Wasserstein Distance Loss for Oriented Object Detection” (Zhu et al., 2023). Other Wasserstein-loss papers use related transport ideas but refer to different objects and different geometries. “Fine-Tuning a Time Series Foundation Model with Wasserstein Loss” uses a closed-form Wasserstein loss on ordered token bins for discretized regression rather than on geometric box edges (Chernov, 2024). “2D Wasserstein Loss for Robust Facial Landmark Detection” applies Wasserstein distance to 2D heatmaps interpreted as spatial probability distributions (Yan et al., 2019). “A Quasi-Wasserstein Loss for Learning Graph Neural Networks” defines label transport on graph edges as an edge-supported flow loss for node prediction (Cheng et al., 2023). “Exploiting Edge Features in Graphs with Fused Network Gromov-Wasserstein Distance” compares graphs using node features, pairwise structure, and explicit edge features, but in a graph-matching setting rather than in oriented box regression (Yang et al., 2023).
This delimitation matters because the word “edge” is overloaded. In (Zhu et al., 2023), it denotes the four edges of an oriented box. It does not denote image edges, contour maps, or graph edges. A common misconception is therefore to read EWD as a generic edge-aware Wasserstein loss for vision or graph learning. The supplied evidence does not support that interpretation. The method is an oriented-box regression loss whose defining transport support is the set of box edges.
A plausible implication is that the broader Wasserstein-loss family is unified less by any single object type than by a repeated modeling choice: define a support that reflects the task geometry, then choose a transport distance on that support. In EWD, that support is the boundary geometry of oriented boxes.