Papers › Boundary loss for highly unbalanced segmentation

Boundary loss for highly unbalanced segmentation

17 Dec 2018arXiv:1812.07032archive 2025-07-28

Hoel Kervadec, Jihene Bouchtiba, Christian Desrosiers, Eric Granger, Jose Dolz, Ismail Ben Ayed

Widely used loss functions for CNN segmentation, e.g., Dice or cross-entropy, are based on integrals over the segmentation regions. Unfortunately, for highly unbalanced segmentations, such regional summations have values that differ by several orders of magnitude across classes, which affects training performance and stability. We propose a boundary loss, which takes the form of a distance metric on the space of contours, not regions. This can mitigate the difficulties of highly unbalanced problems because it uses integrals over the interface between regions instead of unbalanced integrals over the regions. Furthermore, a boundary loss complements regional information. Inspired by graph-based optimization techniques for computing active-contour flows, we express a non-symmetric L₂ distance on the space of contours as a regional integral, which avoids completely local differential computations involving contour points. This yields a boundary loss expressed with the regional softmax probability outputs of the network, which can be easily combined with standard regional losses and implemented with any existing deep network architecture for N-D segmentation. We report comprehensive evaluations and comparisons on different unbalanced problems, showing that our boundary loss can yield significant increases in performances while improving training stability. Our code is publicly available: https://github.com/LIVIAETS/surface-loss .

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1812.07032")

Code

Syntology Ran 2 of 26 code samples harvested from 3 repositories linked to this paper; 24 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 1 ran with no contract checked.

By repository: official repository: 16 samples from 1 repository, 0 ran; named in the paper: 9 samples from 1 repository, 1 ran; community (archive-listed): 1 sample from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

LIVIAETS/surface-loss officialmentioned in papermentioned on GitHubpytorchMIT report
JunMa11/SegWithDistMap mentioned in paperpytorchApache-2.0 report
LIVIAETS/boundary-loss mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

26 samples harvested; 2 ran; 0 honoured the contract we drafted; 24 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
1ran
24unverified

Licence: 0 of the 26 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

calc_dist_map LIVIAETS/surface-loss/keras_loss.py official repository unverified MIT (permissive) · 1360133daf617b75 · report
calc_dist_map_batch LIVIAETS/surface-loss/keras_loss.py official repository unverified MIT (permissive) · 5d556db04429fb51 · report
convBatch LIVIAETS/surface-loss/models/unet.py official repository unverified MIT (permissive) · f782c9b52688a9a9 · report
convBatch LIVIAETS/surface-loss/models/unet_3d.py official repository unverified MIT (permissive) · d6d8c157b0fe7c67 · report
conv_block_1 LIVIAETS/surface-loss/models/enet.py official repository unverified MIT (permissive) · 3d16046506fbe457 · report
conv_block_3 LIVIAETS/surface-loss/models/residualunet.py official repository unverified MIT (permissive) · e8e661fe6aeab789 · report
conv_block_3_3 LIVIAETS/surface-loss/models/enet.py official repository unverified MIT (permissive) · 2dfdec9e4819ad2f · report
conv_block_Asym LIVIAETS/surface-loss/models/enet.py official repository unverified MIT (permissive) · ed82be9bf6339731 · report
conv_decod_block LIVIAETS/surface-loss/models/residualunet.py official repository unverified MIT (permissive) · 5cf3566e05bb18ec · report
equalized_png LIVIAETS/surface-loss/dataloader.py official repository unverified MIT (permissive) · 7ecbaf27d3da12ad · report
get_hd_thing LIVIAETS/surface-loss/metrics_overtime.py official repository unverified MIT (permissive) · 4fc1f8360a0e35b4 · report
png_transform LIVIAETS/surface-loss/dataloader.py official repository unverified MIT (permissive) · 846feecee7032e57 · report
png_transform_npy LIVIAETS/surface-loss/dataloader.py official repository unverified MIT (permissive) · 5709081059db578c · report
surface_loss_keras LIVIAETS/surface-loss/keras_loss.py official repository unverified MIT (permissive) · 7b6fa13d0d15c5c6 · report
upSampleConv LIVIAETS/surface-loss/models/unet.py official repository unverified MIT (permissive) · 87dbd4de1038f468 · report
upSampleConv LIVIAETS/surface-loss/models/unet_3d.py official repository unverified MIT (permissive) · 8fabb14002c9b72f · report
dice_loss JunMa11/SegWithDistMap/code/train_LA_AAAISDF_L1.py named in the paper ran fingerprinted Apache-2.0 (permissive) · 9f3489c005e0165d · report
AAAI_sdf_loss JunMa11/SegWithDistMap/code/train_LA_AAAISDF.py named in the paper unverified Apache-2.0 (permissive) · 01eb16aef3c1a2ee · report
compute_dtm JunMa11/SegWithDistMap/code/train_LA_HD.py named in the paper unverified Apache-2.0 (permissive) · 5ab231e5bc1d24e8 · report
compute_dtm JunMa11/SegWithDistMap/code/train_LA_MultiHead_FGDTM_L1.py named in the paper unverified Apache-2.0 (permissive) · c31b9d7d8654e51e · report
compute_dtm01 JunMa11/SegWithDistMap/code/train_LA_HD.py named in the paper unverified Apache-2.0 (permissive) · 7c3c7a172dedaec1 · report
compute_sdf JunMa11/SegWithDistMap/code/train_LA_AAAISDF.py named in the paper unverified Apache-2.0 (permissive) · 054bbe15e59a75fd · report
compute_sdf JunMa11/SegWithDistMap/code/train_LA_AAAISDF_L1.py named in the paper unverified Apache-2.0 (permissive) · 51591160b502b364 · report
compute_sdf JunMa11/SegWithDistMap/code/train_LA_BD.py named in the paper unverified Apache-2.0 (permissive) · cd97b112475b91ef · report
compute_sdf1_1 JunMa11/SegWithDistMap/code/train_LA_BD.py named in the paper unverified Apache-2.0 (permissive) · 88bd81c3121062eb · report
conv_block LIVIAETS/boundary-loss/models/residualunet.py community (archive-listed) ran · our draft was wrong MIT (permissive) · b44139feb813153e · report

Tasks

Brain Lesion Segmentation From MriIschemic Stroke Lesion SegmentationLesion SegmentationMedical Image AnalysisMedical Image SegmentationSegmentationSemantic SegmentationUnbalanced Segmentation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Softmax

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