arXiv:2610.07698cs.CVOct 2026

Manuscript Offprint

arXiv:2610.07698

RBMatch: Dual-Level Class Rebalancing for Semi-Supervised Building Footprint Extraction

Akil Ahmad Taki, Shaikh Anowarul Fattah

Akil Ahmad Taki 1,2^{1,2}, Shaikh Anowarul Fattah 1^{1} Member, IEEE

Abstract—Accurate building footprint extraction from high-resolution remote sensing imagery underpins urban planning, disaster response, and environmental monitoring. This remains a challenge, as conventional supervised learning involves extensive pixel-wise annotation. On the other hand, Semi-supervised learning (SSL) reduces this burden by exploiting unlabeled data through self-training. However, remote sensing images are inherently dominated by background pixels, and this class imbalance biases the unsupervised gradient toward the majority class during self-training. We found that fixing this imbalance at a single stage falls short. If only the pseudo-labels are balanced, the background bias still reappears during the unsupervised loss calculation, an issue we term the imbalance leak. To address this issue, we propose RBMatch, a dual-level class-rebalancing framework that intervenes at both the pseudo-label and loss levels of self-training. RBMatch integrates a standard supervised pathway with a robust self-training module that incorporates three components: adaptive class-specific thresholding (ACT) for balanced pseudo-label selection, confidence-aware class-balanced reweighting (CACBR) of the unsupervised loss, and a distribution alignment layer (DAL) that matches predicted class distributions on unlabeled data to the labeled-data prior. Experiments on the WHU, INRIA, and Massachusetts building datasets under labeled ratios of 1%–10% show that RBMatch attains the highest building IoU and F1 in every setting evaluated. Gains are largest on the most imbalanced benchmark, Massachusetts, where RBMatch improves IoU by 1.37 over the strongest baseline at r = 0.01 and it is the only method to exceed the supervised baseline in all twelve dataset–ratio settings.

Index Terms—Building footprint extraction, class imbalance, confidence-aware reweighting, debiasing, distribution alignment, remote sensing, semi-supervised learning.

I. INTRODUCTION

BUILDING footprint extraction (pixel-level segmentation of buildings from optical imagery) supports urban-growth monitoring, damage assessment, and population estimation. Transformers like SegFormer [1] set strong benchmarks but require expensive dense pixel-wise annotations. Semi-supervised learning (SSL) addresses this bottleneck by pairing a small labeled set with a large unlabeled corpus. The dominant paradigm is weak-to-strong self-training: pseudo-labels from weakly augmented unlabeled images supervise predictions on strongly augmented counterparts [2], [3]. Self-training pipelines divide into consistency-based [4], [5] and pseudo-label-based methods [2], with the latter dominating recent state-of-the-art.

This paradigm exposes a structural difficulty on building data: severe class imbalance. Building pixels occupy at most 10–25% of image area, and as little as 3–5% in suburban scenes. This imbalance creates a positive feedback loop: initial background bias yields skewed pseudo-labels, which reinforces the bias during training—a form of confirmation bias [6].

Recent work corrects imbalance at distinct pipeline stages. At the logit level, DBMatch [7] subtracts a global bias estimated from class-conditional logit means. At the threshold level, FreeMatch [8] and AdaptMatch [9] replace FixMatch's fixed τ=0.95\tau = 0.95 with dynamic thresholds that admit more minority pseudo-labels. Class imbalance is also treated at the loss level via focal loss [10], effective-number balancing [11], margin-aware losses [12], [13], distribution alignment [14], and labeled-data-anchored resampling (DARS [15]). In remote-sensing SSL, Zhang et al. [16] rebalance which samples enter consistency regularization at the input-batch level.

These methods improve on FixMatch but share a structural flaw: relying on a single corrective intervention. After any threshold correction, the selected set S remains dominated by background due to spatial sparsity (background pixels vastly outnumber building pixels) and confidence asymmetry (homogeneous background accumulates high-confidence pixels quickly). Because the unsupervised loss aggregates per-pixel terms uniformly, the gradient stays background-dominated regardless of how S is constructed. Threshold rebalancing fixes which pseudo-labels are used; it does not fix how much each contributes. We term this residual skew the imbalance leak.

To address these challenges, the main contributions are summarized as follows:

• We empirically characterize the imbalance leak, showing that residual selection skew drives majority-class gradient dominance.

• We propose RBMatch, the first remote-sensing SSL framework to coordinate rebalancing at both the pseudo-label level (via adaptive thresholding and distribution alignment) and loss level (via confidence-aware reweighting).

• We demonstrate that RBMatch achieves state-of-the-art building IoU/F1 across three benchmarks at diverse labeled ratios.

• We provide mechanistic evidence via gradient-weight logging that our loss-level intervention mitigates residual pseudo-label imbalance.

References (21)