Papers › Residual Pattern Learning for Pixel-wise Out-of-Distribution Detection in Semantic Segmentation

Residual Pattern Learning for Pixel-wise Out-of-Distribution Detection in Semantic Segmentation

26 Nov 2022ICCV 2023 1arXiv:2211.14512archive 2025-07-28

Yuyuan Liu, Choubo Ding, Yu Tian, Guansong Pang, Vasileios Belagiannis, Ian Reid, Gustavo Carneiro

Semantic segmentation models classify pixels into a set of known (``in-distribution'') visual classes. When deployed in an open world, the reliability of these models depends on their ability not only to classify in-distribution pixels but also to detect out-of-distribution (OoD) pixels. Historically, the poor OoD detection performance of these models has motivated the design of methods based on model re-training using synthetic training images that include OoD visual objects. Although successful, these re-trained methods have two issues: 1) their in-distribution segmentation accuracy may drop during re-training, and 2) their OoD detection accuracy does not generalise well to new contexts (e.g., country surroundings) outside the training set (e.g., city surroundings). In this paper, we mitigate these issues with: (i) a new residual pattern learning (RPL) module that assists the segmentation model to detect OoD pixels without affecting the inlier segmentation performance; and (ii) a novel context-robust contrastive learning (CoroCL) that enforces RPL to robustly detect OoD pixels among various contexts. Our approach improves by around 10\% FPR and 7\% AuPRC the previous state-of-the-art in Fishyscapes, Segment-Me-If-You-Can, and RoadAnomaly datasets. Our code is available at: https://github.com/yyliu01/RPL.

PaperPDFConference PDFCodeCode 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="2211.14512")

Code

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

By repository: official repository: 10 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

yyliu01/rpl officialmentioned in papermentioned on GitHubpytorchMIT report
yyliu01/it2 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

10 samples harvested; 3 ran; 0 honoured the contract we drafted; 7 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
2ran
7unverified

Licence: 0 of the 10 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 yyliu01/rpl. “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.

Upsample yyliu01/rpl/rpl.code/model/mynn.py official repository ran MIT (permissive) · 65036122655f55ba · report
bnrelu yyliu01/rpl/rpl.code/model/wide_resnet_base.py official repository ran MIT (permissive) · cd5145f17043aea6 · report
conv3x3 yyliu01/rpl/rpl.code/model/resnet.py official repository ran · our draft was wrong MIT (permissive) · fac5364e2f53c6db · report
Norm2d yyliu01/rpl/rpl.code/model/mynn.py official repository unverified MIT (permissive) · e88336b0fba9336c · report
all_gather_samples yyliu01/rpl/rpl.code/valid.py official repository unverified MIT (permissive) · 099d45b346da1fd6 · report
compute_anomaly_score yyliu01/rpl/rpl.code/valid.py official repository unverified MIT (permissive) · fed5d097b5e9c6b5 · report
disimilarity_entropy yyliu01/rpl/rpl.code/loss/PositiveEnergy.py official repository unverified MIT (permissive) · 636e8a6b9fc0f5ec · report
energy_loss yyliu01/rpl/rpl.code/loss/PositiveEnergy.py official repository unverified MIT (permissive) · 3e5a5d0d501b2416 · report
final_test_inlier yyliu01/rpl/rpl.code/valid.py official repository unverified MIT (permissive) · 73678314f37edd92 · report
forgiving_state_restore yyliu01/rpl/rpl.code/model/mynn.py official repository unverified MIT (permissive) · f2ceca3699d06b96 · report

Tasks

Anomaly DetectionAnomaly SegmentationContrastive LearningOut of Distribution (OOD) DetectionOut-of-Distribution DetectionScene SegmentationSegmentationSemantic Segmentation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Anomaly Detection Fishyscapes RPL+CoroCL AP 95.96 #1 of 8 Archive leaderboard report
Anomaly Detection Fishyscapes RPL+CoroCL FPR95 0.52 #1 of 8 Archive leaderboard report
Anomaly Detection Fishyscapes L&F RPL+CoroCL AP 53.99 #4 of 18 Archive leaderboard report
Anomaly Detection Fishyscapes L&F RPL+CoroCL FPR95 2.27 #4 of 18 Archive leaderboard report
Anomaly Detection Road Anomaly RPL+CoroCL AP 71.61 #6 of 10 Archive leaderboard report
Anomaly Detection Road Anomaly RPL+CoroCL FPR95 17.74 #6 of 10 Archive leaderboard report
Scene Segmentation StreetHazards LDN121-RPL Open-mIoU 56.3 #2 of 3 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Contrastive Learning

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