Blueprint · 2026

Pre-Corr Polarization Weighting Architecture

Model class: `StereoPolVolumeV2E` Subtitle: Pre-Corr Pol Weighting (polarization weighting that intervenes at the moment correlation is formed) Document type: Architecture design specification (design only, no experimental results)

  • stereo matching
  • polarization
  • RAFT-Stereo

Using these blueprints

Everything here is an architecture proposal I designed and chose to publish openly. Free to use, adapt, or build on — no permission needed.

If one turns out useful and crediting is convenient, a link back to this site is appreciated. It's never required.

1. Design Goals

When polarization participates in stereo matching, if the correlation volume is first fully computed and then corrected or modulated using pol information, there is a fundamental limitation: once a wrong correlation has been formed, correcting it is too late.

If the correlation value of a false match is already high at the computation stage, post-hoc additive residuals, gating, and modulation can only try to suppress it, but cannot prevent it from being computed in the first place.

The design goal of this architecture is: move the intervention point from “after corr computation” to “during corr computation” — let polarization participate at the moment correlation is formed, suppressing false matches at the source.

Post-Corr approachPre-Corr Weighting (this architecture)
TimingAfter corr computationDuring corr computation
EffectCorrect existing corrInfluence the formation of corr
AnalogyAfter-the-fact remedySource intervention

2. Architecture Design: Pre-Corr Pol Weighting

# Pre-Corr (pol participates in corr computation)
for d in disparity_range:
    pol_diff_d = left - shift(right, d)
    pol_weight_d = sigmoid(f(pol_diff_d))  # [0, 1]

    # pol directly affects the weight of correlation
    corr[d] = dot(fmap1, fmap2_at_d) * pol_weight_d

This architecture does not “first compute the full corr and then correct it”; instead, at the moment correlation is computed per disparity, it multiplies by a weight pol_weight_d determined by pol.

  • For each disparity candidate d: first compute the polarization difference pol_diff_d = left - shift(right, d) at that d.
  • Use a small function f plus sigmoid to convert pol_diff_d into a [0,1] weight pol_weight_d.
  • Correlation is weighted at computation time: corr[d] = dot(fmap1, fmap2_at_d) * pol_weight_d.

Physical Meaning

  • High pol_weight_d: the pol_diff at this disparity matches the characteristics of “the same physical point”, so this match is trustworthy.
  • Low pol_weight_d: this disparity may be a false match (reflection / misalignment), and this match should be suppressed.
  • False matches are suppressed at the moment correlation is formed, rather than corrected afterwards — false matches cannot obtain high correlation values from the start.

3. Architecture (Data Flow)

Pre-Corr Pol Weighting data flow

The key point is that * pol_weight_d occurs in the same step where corr[d] is written, rather than as a separate modulation after the full corr is formed.


4. Components and Modules

ComponentFunction
Pol Weighting function f + sigmoidProduces pol_weight_d in [0,1] from pol_diff_d; hidden dimension configured by pol_weight_hidden (e.g. 8)
Weighted Correlation computationMultiplies by pol_weight_d while computing correlation per disparity
UpdateBlockReuses the original RAFT

f is a small network (pol_weight_hidden=8), deliberately kept lightweight, positioned as mechanism validation rather than a black box.


5. Tensor Dimensions

TensorShapeDescription
fmap1 / fmap2FeatureEncoder outputUsed to compute correlation
pol_diff_d(B, *, H, W)Polarization difference at the d-th disparity
pol_weight_d(B, 1, H, W)[0,1], per-disparity weight
corr[d](B, *, H, W)Weighted correlation at the d-th disparity
Correlation volume(B, ..., D, H, W)Stack over all d

6. Hyperparameters

HyperparameterValueDescription
pol_weight_hidden8Hidden dimension of the Pol Weighting function f
pol_levels4Number of pyramid levels in the polarization volume
pol_radius4Lookup radius of the polarization volume
iters24Number of GRU iterations

7. Design Decisions and Rationale

DecisionRationale
Place the intervention point at pre-corr (during correlation computation)Suppress false matches at the moment correlation is formed, avoiding “the error has been made, correction is too late”
Compute pol_weight_d per disparityThe weight carries disparity semantics, enabling separate trustworthiness judgement for each candidate
Use dot(...) * pol_weight_d multiplicative weightingDirectly scales correlation strength; false matches cannot obtain high scores at the source
f uses a small network (hidden=8)Mechanism proof — validates the pre-corr weighting mechanism itself
Sigmoid output in [0,1]The weight cannot amplify correlation, only “preserve or suppress”
UpdateBlock keeps the original RAFTPreserves pretrained capability

8. Highlights

  • Places the polarization intervention point at the “moment of computing” correlation rather than “after computing”, suppressing false matches at the source and avoiding the difficulty of correcting wrong correlations once they are formed.
  • * pol_weight_d and the writing of corr[d] happen in the same step; polarization directly participates in the formation of correlation rather than being added as an extra modulation layer.
  • The polarization weight is computed per disparity, carrying disparity semantics, enabling separate trustworthiness judgement for each candidate.
  • The sigmoid output in [0,1] can only “preserve or suppress” correlation and cannot amplify it, so false matches cannot obtain high scores at the source.
  • The Pol Weighting function f is deliberately kept as a small network (hidden=8), positioned as mechanism validation; UpdateBlock reuses the original RAFT, preserving pretrained capability.

← All blueprints