Current implementation: normalized concentration-corrected token-weighted reconstruction
Current implementation: normalized concentration-corrected token-weighted reconstruction
Methodology note: Normalized concentration-corrected token-weighted reconstruction
This note records how the normalized concentration-corrected token-weighted reconstruction term is currently implemented in code.
Current status
This idea is now implemented as one explicit reconstruction term:
normalized_concentration_corrected_token_weighted_reconstruction_loss
Current definition
The implementation starts from the raw token-weighted per-example reconstruction loss
It then divides by the per-example token concentration factor
and finally divides the batch mean by the shared global z-free reference scale
So the current scalar term is
Where the supporting statistics come from
The required per-example quantities come from:
path:core/disentanglement/token_weighting.py
The relevant fields are:
token_weighted_base_losstoken_concentration_factor
These are computed from aligned frozen-reference z-free token losses using the same token weights as the raw token-weighted reconstruction term.
Where the term is assembled
The low-level scalar helper lives in:
path:core/disentanglement/losses.py
and is integrated in:
path:core/disentanglement/shared_discrete_cvae.pypath:core/disentanglement/continuous_cvae.py
Configuration surface
The current configuration contract lives in:
path:core/disentanglement/config.py
under:
ReconstructionLossConfig.normalized_concentration_corrected_token_weighted_weightReconstructionLossConfig.token_weight_alphaReconstructionLossConfig.zfree_reference_scale
The current CLI surface is:
--normalized-concentration-corrected-token-weighted-reconstruction-weight--token-weighted-reconstruction-alpha
Current relationship to raw token-weighted reconstruction
The implementation keeps both token-level terms explicit:
token_weighted_reconstruction_lossnormalized_concentration_corrected_token_weighted_reconstruction_loss
They are tracked separately and each has its own objective weight.