Papers
Topics
Authors
Recent
Search
2000 character limit reached

SECL: Self-Evolution Contrastive Loss

Updated 22 November 2025
  • SECL is a self-referential contrastive loss that leverages past network states (latency models) to form anchor–positive–negative triplets, improving depth estimation in challenging weather conditions.
  • It integrates interval-based depth distribution encoding with dynamic margin thresholding and Jensen–Shannon divergence to stabilize predictions under environmental degradations.
  • Empirical results show significant reductions in AbsRel metrics, attesting to SECL's effectiveness in enhancing model robustness and prediction sharpness in rain, fog, and snow.

Self-Evolution Contrastive Loss (SECL) is a self-referential regularization technique introduced for robust self-supervised monocular depth estimation, particularly under adverse weather conditions that impair visibility and degrade standard photometric supervision. SECL operates within the SEC-Depth framework, which leverages temporally evolving “latency” models—snapshots of the network from earlier training stages— to construct contrastive losses without the need for external teachers or handcrafted curricula. SECL combines interval-based depth distribution encoding, dynamic margin thresholding, and adaptive integration to stabilize and enhance depth prediction performance in challenging scenarios such as rain, fog, and snow (Cao et al., 19 Nov 2025).

1. SEC-Depth Framework and Training Objective

The core task addressed is self-supervised monocular depth estimation, traditionally optimized with a photometric reconstruction loss:

Lph=β1(1SSIM(I,I~))+β2II~L_{\text{ph}} = \beta_1 \cdot (1 - \mathrm{SSIM}(I, \tilde{I}')) + \beta_2 \cdot |I - \tilde{I}'|

where I~\tilde{I}' is the warped counterpart of II' using predicted disparities, and SSIM\mathrm{SSIM} denotes the structural similarity index.

SEC-Depth extends this by periodically introducing weather-corrupted inputs IaugI_{\text{aug}} (e.g., rain/fog/snow) every SS iterations. The full objective is:

L=Lph(clean)+Lph(degraded)+wLcL = L_{\text{ph}}(\text{clean}) + L_{\text{ph}}(\text{degraded}) + w \cdot L_c

where ww is a dynamic scalar controlling the contrastive loss term LcL_c. The contrastive component exploits the model’s parameter history, forming anchor–positive–negative triplets from current and prior states. Notably, this design removes dependence on external negative sampling or specialized synthetic weather curricula.

2. Mathematical Definition and Construction of SECL

Sample Construction and Depth Distribution

For each training input, SECL defines:

  • Anchor disparity: DA=Ft(Iaug)D_A = F_t(I_{\text{aug}}) from the current model.
  • Positive disparity: I~\tilde{I}'0 from the current model applied to the clean image.
  • Negative disparities: I~\tilde{I}'1 from I~\tilde{I}'2 historical “latency” models.

Normalized disparities in I~\tilde{I}'3 are partitioned into I~\tilde{I}'4 fixed-width bins centered at I~\tilde{I}'5. For each pixel disparity I~\tilde{I}'6, the assignment to bin I~\tilde{I}'7 uses a Gaussian kernel:

I~\tilde{I}'8

Averaging I~\tilde{I}'9 across all pixels yields a discrete distribution II'0 for II'1.

SECL Formula

Let II'2 denote the Jensen–Shannon divergence. SECL is given by:

II'3

where for II'4,

II'5

II'6 is a dynamic margin:

II'7

with II'8 as the current step, II'9 total steps, and SSIM\mathrm{SSIM}0 decay parameters; SSIM\mathrm{SSIM}1 is a fixed margin (default 0.005). The factor SSIM\mathrm{SSIM}2 (default SSIM\mathrm{SSIM}3) modulates the “hardness” penalty for negatives.

3. Latency Model Queue and Dynamic Updating

Historical models (“latency models”) are maintained in a circular queue SSIM\mathrm{SSIM}4 of length SSIM\mathrm{SSIM}5 (typically SSIM\mathrm{SSIM}6). This queue is updated every SSIM\mathrm{SSIM}7 steps (default SSIM\mathrm{SSIM}8) or conditionally if the variability of current anchor-negative pairs drops below that of anchor–positive. Updates use exponential moving average (EMA) smoothing:

  • Given pointer SSIM\mathrm{SSIM}9,
  • For each step IaugI_{\text{aug}}0:
    • If update triggered: IaugI_{\text{aug}}1 (with momentum IaugI_{\text{aug}}2), replace IaugI_{\text{aug}}3, advance IaugI_{\text{aug}}4 mod IaugI_{\text{aug}}5.

Negative examples for SECL are generated by forwarding IaugI_{\text{aug}}6 through all models in IaugI_{\text{aug}}7. This mechanism ensures controlled diversity and progressive difficulty for contrastive learning.

4. Adaptive Weighting and Integration into the Learning Process

To avoid destabilization at early optimization stages, the weight IaugI_{\text{aug}}8 on IaugI_{\text{aug}}9 is initialized at SS0 and linearly increased after epoch SS1 until SS2:

  • For SS3: SS4
  • For SS5: SS6

SECL adaptively senses the severity of weather-induced degradation based on the observed SS7: larger values indicate that current predictions diverge strongly from historical negatives, typically signifying more severe degradation (e.g., heavy rain/fog), and thus trigger stronger contrastive gradients. This enables the learning objectives to shift in response to the evolving difficulty of adverse conditions, reducing the need for manual intervention in curriculum design.

5. Implementation Details and Key Hyperparameters

Critical training hyperparameters include:

Parameter Default Value Purpose
Degradation injection interval SS8 steps Frequency of weather corruption
Number of negatives SS9 Size of latency queue
Depth bins L=Lph(clean)+Lph(degraded)+wLcL = L_{\text{ph}}(\text{clean}) + L_{\text{ph}}(\text{degraded}) + w \cdot L_c0 Binning for interval-based distributions
Kernel parameter L=Lph(clean)+Lph(degraded)+wLcL = L_{\text{ph}}(\text{clean}) + L_{\text{ph}}(\text{degraded}) + w \cdot L_c1 For Gaussian binning
Margin decay L=Lph(clean)+Lph(degraded)+wLcL = L_{\text{ph}}(\text{clean}) + L_{\text{ph}}(\text{degraded}) + w \cdot L_c2, L=Lph(clean)+Lph(degraded)+wLcL = L_{\text{ph}}(\text{clean}) + L_{\text{ph}}(\text{degraded}) + w \cdot L_c3 Dynamic margin for contrastive separation
Fixed negative margin L=Lph(clean)+Lph(degraded)+wLcL = L_{\text{ph}}(\text{clean}) + L_{\text{ph}}(\text{degraded}) + w \cdot L_c4 Threshold for negative diversity
Hardness penalty L=Lph(clean)+Lph(degraded)+wLcL = L_{\text{ph}}(\text{clean}) + L_{\text{ph}}(\text{degraded}) + w \cdot L_c5 Negative component weight
Contrastive schedule L=Lph(clean)+Lph(degraded)+wLcL = L_{\text{ph}}(\text{clean}) + L_{\text{ph}}(\text{degraded}) + w \cdot L_c6 Initial weight for L=Lph(clean)+Lph(degraded)+wLcL = L_{\text{ph}}(\text{clean}) + L_{\text{ph}}(\text{degraded}) + w \cdot L_c7
EMA momentum L=Lph(clean)+Lph(degraded)+wLcL = L_{\text{ph}}(\text{clean}) + L_{\text{ph}}(\text{degraded}) + w \cdot L_c8 Latency model smoothing
Queue update interval L=Lph(clean)+Lph(degraded)+wLcL = L_{\text{ph}}(\text{clean}) + L_{\text{ph}}(\text{degraded}) + w \cdot L_c9 Refreshing interval for queue

Other training settings (learning rate, batch size, image size) align with the self-supervised backbone, such as MonoViT or PlaneDepth (Cao et al., 19 Nov 2025).

6. Empirical Evaluation: Ablation and Zero-Shot Robustness

Ablation studies underscore the incremental impact of SECL components under the MonoViT backbone on WeatherKITTI and diverse zero-shot scenarios:

  • Adding contrastive learning reduces AbsRel from 0.120 to 0.106 (zero-shot: 0.169→0.146)
  • Interval-based depth distribution further reduces AbsRel to 0.105 (zero-shot: 0.144)
  • Full SECL (with margin terms ww0) yields AbsRel 0.104 (zero-shot: 0.142)

SECL-specific hyperparameter ablations identified:

  • Exponential decay for ww1 outperforms linear decay (AbsRel 0.142 vs. 0.147).
  • Best fixed margin: ww2.
  • Best ww3.
  • ww4 bins achieves a favorable balance between computational cost and accuracy.

Zero-shot robustness is demonstrated on six unseen adverse weather datasets (e.g., DrivingStereo rain/fog, Cityscapes snow/rain/fog), achieving the following results:

  • MonoViT + SEC-Depth: AbsRel reduced from 0.169 to 0.142, outperforming WeatherDepth and Robust-Depth baselines.
  • PlaneDepth + SEC-Depth: AbsRel from 0.215 to 0.168 versus WeatherDepth. Qualitative evidence shows sharper object boundaries and fewer “collapse failures” under heavy weather.

7. Significance and Relation to Prior Work

SECL defines a plug-and-play, model-agnostic loss informed solely by the network’s own evolving representations. By exploiting model “past selves” as negatives, SECL circumvents reliance on external data, handcrafted curricula, or auxiliary teacher models for curriculum scheduling. This approach generalizes across architectures and task domains characterized by variation in degradation type or severity, providing a principled mechanism for robust depth estimation under real-world adverse conditions (Cao et al., 19 Nov 2025).

A plausible implication is that such latency-driven contrastive objectives could extend beyond depth regression to other domains where robustness to evolving data distributions and degradation is critical.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Self-Evolution Contrastive Loss (SECL).