---
title: Edge-Aware Superpixel Label Propagation
url: https://www.emergentmind.com/topics/edge-aware-superpixel-label-propagation-easlp
type: topic
---

# Edge-Aware Superpixel Label Propagation

Edge-Aware Superpixel Label Propagation (EASLP) is a module designed for semi-supervised hyperspectral image classification that addresses boundary label diffusion by spatially refining pseudo-labels through edge-intensity penalization and neighborhood correction. Embedded at the beginning of the unlabeled-data branch in the overarching Dynamic Reliability-Enhanced Pseudo-Label Framework (DREPL), EASLP produces structure-aware pseudo-label maps which facilitate spatial consistency and improved boundary robustness, significantly enhancing performance in land-cover classification tasks [2601.18049].

## 1. Motivation and Conceptual Framework

Semi-supervised hyperspectral classification relies on generating pseudo-labels for unlabeled pixels to compensate for limited annotated data. Conventional label propagation propagates labels within superpixels segmented from the image—an approach susceptible to boundary label diffusion wherein labels may spread inappropriately across true class boundaries, compromising classification accuracy. EASLP mitigates this by incorporating spatial priors and explicit edge awareness: after segmenting the image via SLIC into $M$ superpixels $\{S_1, ..., S_M\}$, it propagates labels based either on true annotations or spectral prototype matching. Label propagation is modulated by an edge intensity penalty and further refined using a neighborhood-weighted correction strategy, resulting in pseudo-labels that maintain sharpness at land-cover boundaries. The final structure-aware pseudo-label map $\hat{Y}$ produced by EASLP is then employed in subsequent temporal and sample-consistency modules (DHP, ATSC) under the DREPL framework.

## 2. Mathematical Formulation

EASLP encapsulates classical superpixel label propagation with edge-adaptive mechanisms:

### Superpixel Segmentation and Prototype Similarity

Let $L$ denote labeled pixels, $C_i$ ($i=1...K$) the $K$ classes, and $S_j$ a superpixel.

- If $S_j \cap L \neq \emptyset$, the label is assigned by majority:
  $$ y_j = \arg\max_{c \in \{1...K\}} |\{p \in S_j \cap L : label(p) = c\}| $$
- If $S_j$ has no labeled pixels, compute class prototypes $v_i \in \mathbb{R}^B$ (mean spectrum for class $C_i$) and $v_j$ (mean spectrum for $S_j$). Raw cosine similarity:
  $$ Sim_{ij} = \frac{v_i \cdot v_j}{\|v_i\|\|v_j\|} $$

### Edge-Intensity Penalty

The hyperspectral cube $X \in \mathbb{R}^{H \times W \times B}$ is collapsed to a 2-D grayscale image:
$$ I(x, y) = \frac{1}{B} \sum_{b=1}^B X(x, y, b) $$

Compute per-pixel Sobel gradient magnitude:
$$ E(x, y) = \sqrt{([G_x * I](x, y)^2 + [G_y * I](x, y)^2)} $$
with
\[
G_x = \begin{bmatrix}
-1 & 0 & +1 \\
-2 & 0 & +2 \\
-1 & 0 & +1
\end{bmatrix}
,\quad
G_y = \begin{bmatrix}
-1 & -2 & -1 \\
0 &  0 &  0 \\
+1 & +2 & +1
\end{bmatrix}
\]

Average edge response in each superpixel:
$$ E_j = \frac{1}{|S_j|}\sum_{(x, y) \in S_j} E(x, y) $$

Edge-penalized similarity:
$$ \tilde{Sim}_{ij} = \frac{Sim_{ij}}{1 + E_j} $$

### Neighborhood Correction

For superpixels originally unlabeled, redo label assignment with local voting among neighbors $N(j)$:
$$ 
\hat{y}_j = \arg\max_{c \in \{1...K\}} \sum_{k \in N(j)} \left[\frac{1}{E_k + \epsilon}\right] \cdot \mathbb{I}[y_k = c] 
$$
where $\epsilon = 10^{-6}$ prevents division by zero. This correction leverages smoothness—neighbors in low-edge regions have greater voting weight, reinforcing label consistency away from boundaries.

## 3. Algorithmic Workflow and Pseudocode

The EASLP algorithm processes a hyperspectral image $X$, labeled set $L$, class prototypes $\{v_i\}$, and neighbor graph $N(\cdot)$ as follows:

1. **Superpixel Segmentation**: SLIC partitions $I$ into $M$ superpixels $\{S_j\}$, with target size $\varepsilon_{pixels}$ (commonly 50, 200 for large scenes).
2. **Edge Map Calculation**: Sobel filter applied for $E(x, y)$ at each pixel; $E_j$ computed for all $S_j$.
3. **Initial Label Propagation**: Majority label assignment or edge-penalized prototype matching for each $S_j$.
4. **Neighborhood Correction**: For each originally unlabeled $S_j$, neighbors $N(j)$ vote for class assignment with inverse edge weighting.
5. **Output Generation**: Refined pseudo-label map $\hat{Y} = \{\hat{y}_j\}$.

Computational complexity is $O(N)$–$O(N\log N)$ for SLIC (with $N = H \cdot W$), $O(N)$ for gradient filtering, $O(MKB)$ for prototype matching, and $O(Md)$ for neighborhood voting ($d$ the average superpixel degree).

## 4. Quantitative Analysis and Ablation Results

Removal of EASLP from the pipeline yields marked drops in accuracy, particularly at boundaries. Table A (excerpted from Table VII) illustrates benchmark performance with and without EASLP under a regime of 10 labeled samples per class:

| Dataset      | Metric | w/o EASLP        | Ours (with EASLP) |
|--------------|--------|------------------|-------------------|
| PaviaU       | OA (%) | 92.66 ± 2.53     | 95.21 ± 1.17      |
| PaviaU       | AA (%) | 91.45 ± 1.90     | 94.46 ± 1.48      |
| Houston2013  | OA (%) | 88.90 ± 1.33     | 89.77 ± 1.17      |
| Houston2013  | AA (%) | 90.17 ± 0.86     | 90.87 ± 0.98      |
| KSC          | OA (%) | 99.60 ± 0.13     | 99.71 ± 0.17      |
| Botswana     | OA (%) | 99.18 ± 0.53     | 99.19 ± 0.40      |

Results indicate the most pronounced impact on PaviaU (–2.55 pp OA), substantiating EASLP's critical role in preventing label diffusion and preserving boundary fidelity.

## 5. Integration Within DREPL and Spatio-Temporal Optimization

Upon generating the structure-aware pseudo-label map, EASLP outputs are passed into the weak-augmentation branch of the network, where the Dynamic History-Fused Prediction (DHP) module and Adaptive Tripartite Sample Categorization (ATSC) engage in feature-based pseudo-label refinement. DHP maintains historical predictions and adaptively fuses them with current outputs, stabilizing pseudo-labels over time, while ATSC discriminates easy, ambiguous, and hard samples for hierarchical utilization. The synergy of spatially stable pseudo-labels (from EASLP) and temporally smoothed predictions (from DHP) optimizes spatio-temporal consistency; consequently, pseudo-labels in boundary regions remain robust to noise and temporal fluctuation, which underpins the high classification accuracy observed for the full DREPL + EASLP pipeline.

## 6. Significance and Implications

EASLP constitutes the spatial core of the semi-supervised hyperspectral classification framework, effectively addressing the long-standing issue of boundary misclassification resulting from coarse superpixel label propagation. By explicitly incorporating edge strength penalization and neighbor-informed reassignment, EASLP ensures that propagated labels respect spatial structure, especially at class boundaries. This approach establishes sharp land-cover delineations, enabling subsequent temporal consistency enhancers (DHP, ATSC) in DREPL to operate on reliable spatial inputs. A plausible implication is that similar edge-aware propagation strategies could generalize to other domains where boundary fidelity in semi-supervised learning is paramount.

Source: https://www.emergentmind.com/topics/edge-aware-superpixel-label-propagation-easlp