Methods › General › Loss Functions › Balanced L1 Loss
Balanced L1 Loss
archive 2025-07-28 Description, source and code snippet are the archive's method entry.
Balanced L1 Loss is a loss function used for the object detection task. Classification and localization problems are solved simultaneously under the guidance of a multi-task loss since Fast R-CNN, defined as:
L_(p,u,tᵤ,v) = L_(cls)(p, u) + λ[u ≥1]L_(loc)(tᵘ, v)
L_(cls) and L_(loc) are objective functions corresponding to recognition and localization respectively. Predictions and targets in L_(cls) are denoted as p and u. tᵤ is the corresponding regression results with class u. v is the regression target. λ is used for tuning the loss weight under multi-task learning. We call samples with a loss greater than or equal to 1.0 outliers. The other samples are called inliers.
A natural solution for balancing the involved tasks is to tune the loss weights of them. However, owing to the unbounded regression targets, directly raising the weight of localization loss will make the model more sensitive to outliers. These outliers, which can be regarded as hard samples, will produce excessively large gradients that are harmful to the training process. The inliers, which can be regarded as the easy samples, contribute little gradient to the overall gradients compared with the outliers. To be more specific, inliers only contribute 30% gradients average per sample compared with outliers. Considering these issues, the authors introduced the balanced L1 loss, which is denoted as L_b.
Balanced L1 loss is derived from the conventional smooth L1 loss, in which an inflection point is set to separate inliers from outliners, and clip the large gradients produced by outliers with a maximum value of 1.0, as shown by the dashed lines in the Figure to the right. The key idea of balanced L1 loss is promoting the crucial regression gradients, i.e. gradients from inliers (accurate samples), to rebalance the involved samples and tasks, thus achieving a more balanced training within classification, overall localization and accurate localization. Localization loss L_(loc) uses balanced L1 loss is defined as:
L_(loc) = ∑_(i∈x,y,w,h)L_b(tᵘᵢ-vᵢ)
The Figure to the right shows that the balanced L1 loss increases the gradients of inliers under the control of a factor denoted as α. A small α increases more gradient for inliers, but the gradients of outliers are not influenced. Besides, an overall promotion magnification controlled by γ is also brought in for tuning the upper bound of regression errors, which can help the objective function better balancing involved tasks. The two factors that control different aspects are mutually enhanced to reach a more balanced training.b is used to ensure L_b(x = 1) has the same value for both formulations in the equation below.
By integrating the gradient formulation above, we can get the balanced L1 loss as:
L_b(x) = α/b(b|x| + 1)ln(b|x| + 1) - α|x| if |x| < 1
L_b(x) = γ|x| + C otherwise
in which the parameters γ, α, and b are constrained by αln(b + 1) = γ. The default parameters are set as α= 0.5 and γ= 1.5
Papers archive 2025-07-28
7 shown of 7, newest first. Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code; it is per sample and not a correctness claim.
-
Enhancing Tree Type Detection in Forest Fire Risk Assessment: Multi-Stage Approach and Color Encoding with Forest Fire Risk Evaluation Framework for UAV Imagery 27 Jul 2024 · 0 repositories · arXiv:2407.19184
-
Vision-based Food Nutrition Estimation via RGB-D Fusion Network 25 Oct 2023 · 1 repository
-
Fracture Detection in Wrist X-ray Images Using Deep Learning-Based Object Detection Models 14 Nov 2021 · 0 repositories · arXiv:2111.07355
-
Towards Balanced Learning for Instance Recognition 23 Aug 2021 · 0 repositories · arXiv:2108.10175
-
FoodLogoDet-1500: A Dataset for Large-Scale Food Logo Detection via Multi-Scale Feature Decoupling Network 10 Aug 2021 · 1 repository · arXiv:2108.04644
-
PBRnet: Pyramidal Bounding Box Refinement to Improve Object Localization Accuracy 10 Mar 2020 · 0 repositories · arXiv:2003.04541
-
Libra R-CNN: Towards Balanced Learning for Object Detection 4 Apr 2019 · 6 repositories · arXiv:1904.02701
Tasks archive 2025-07-28
11 tasks the archive attaches to papers tagged with this method, by distinct papers. A task without a page in the catalog is plain text.
Usage over time archive 2025-07-28
Components: the archive holds no method-to-method composition, so PwC's Components table cannot be rebuilt; the Papers list carries no Results column for the same reason (the archive does not join its leaderboard rows to method tags).
Categories archive 2025-07-28
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections