MOS-Guided Triplet Contrastive Loss
- The paper demonstrates that MOS-guided triplet-based contrastive loss orders embeddings based on MOS labels, isolating perceptual speech quality from nuisance factors.
- It employs a batch-all triplet mining strategy with fixed and adaptive margins to enforce relative MOS differences, leading to a more robust quality manifold.
- Empirical results reveal significant gains in Pearson correlation and reduced degradation clustering compared to traditional L2 regression methods.
MOS-guided triplet-based contrastive loss is a contrastive regression objective in which triplets are formed from mean opinion score (MOS) labels so that distances in a learned embedding space are ordered by perceptual speech quality rather than by nuisance factors such as speaker identity, content, phonetics, or degradation type. In the speech quality assessment literature, the formulation is associated primarily with SCOREQ, which presents it as an alternative to end-to-end regression on MOS and argues that relative constraints derived from MOS produce a more robust “quality manifold” for no-reference speech quality prediction (Ragano et al., 2024). A subsequent line, DNSMOS-C, incorporates the same general idea into a compact end-to-end probabilistic regressor, applying MOS-guided triplet supervision directly to intermediate embeddings while preserving single-stage training and unchanged inference relative to DNSMOS Pro (Liang et al., 25 Jun 2026).
1. Conceptual basis and motivation
MOS-guided triplet-based contrastive loss is motivated by the observation that MOS is a continuous target reflecting comparative human judgments. In SCOREQ, the central claim is that training speech quality predictors end-to-end with an regression loss on MOS does not induce an ordered geometry in the learned feature space. The reported consequence is that models entangle nuisance factors rather than align embedded distances with MOS differences, which harms robustness and domain generalization (Ragano et al., 2024).
The underlying principle is relational rather than pointwise. Instead of requiring a model to predict a scalar MOS directly from each individual sample during representation learning, the loss enforces that, for a given anchor utterance, a sample with a closer MOS should be embedded nearer than a sample with a more distant MOS. SCOREQ explicitly interprets this as encoding the fact that listeners judge quality relationally, through anchoring and relative sensory judgment. In that formulation, the objective is not merely to fit absolute values, but to build a global MOS-ordered manifold in which Euclidean distances reflect perceptual differences (Ragano et al., 2024).
DNSMOS-C adopts the same motivation within a different architectural regime. It states that a contrastive signal encourages latent spaces to reflect perceptual similarity, so that samples with similar MOS are pulled together while dissimilar ones are pushed apart. In that account, the resulting quality manifold facilitates rank-order prediction, improves generalization to unseen distortions, and stabilizes training. The paper positions this as an alternative to approaches based on large self-supervised learning encoders and multi-stage training, emphasizing that MOS-guided contrastive supervision can also be used in a compact end-to-end model (Liang et al., 25 Jun 2026).
A plausible implication is that the term denotes not a single fixed loss across all works, but a family of triplet-based objectives whose common feature is that triplet validity is determined by MOS similarity or dissimilarity rather than by discrete class identity.
2. Formalization in SCOREQ
In SCOREQ, a batch contains speech samples with raw inputs and MOS labels . An encoder and projection head produce
and distances in embedding space are defined by the Euclidean metric
The core ordering constraint is: if the positive is closer to the anchor in MOS than the negative,
then the embedding distances should satisfy
To express this over all ordered triplets with distinct indices, SCOREQ defines the batch-all valid-triplet mask
The fixed-margin variant is
0
and the adaptive-margin variant is
1
The adaptive term is normalized by 2 so that the margin scales into 3, and the paper states that harder triplets are thereby enforced more strictly (Ragano et al., 2024).
SCOREQ also presents a classical hinge triplet loss for classification,
4
but makes clear that the MOS-guided SCOREQ losses are the ones actually used. The stated difference is that these MOS-guided losses rely on labels to form valid triplets and remove easy triplets rather than relying on a hinge term to zero out satisfied constraints (Ragano et al., 2024).
This formalization makes the regression target act as a source of ordering constraints. A plausible implication is that the loss occupies an intermediate position between ordinal learning and metric learning: it retains continuous supervision through MOS differences while training an embedding geometry through triplet comparisons.
3. Triplet construction, mining, and optimization behavior
SCOREQ uses a batch-all strategy adapted to regression. All valid triplets in the batch are contrasted online, with no offline triplet lists. Validity is label-driven: positives are samples closer in MOS to the anchor than negatives. After embedding distances are computed, any valid triplet whose constraint is already satisfied is dropped, so optimization focuses on violating or semi-hard triplets (Ragano et al., 2024).
The high-level training loop is specified as follows. Given a batch 5, the model computes 6 and 7, forms pairwise MOS distances 8, builds the label-based mask 9 if 0 and 1, computes pairwise embedding distances 2, optionally builds an easy-removal mask 3 if 4, and then applies either the fixed- or adaptive-margin loss over the surviving triplets before backpropagation (Ragano et al., 2024).
The paper distinguishes this procedure from NOMAD’s offline triplet preparation and NSIM-based hardness, stating that broadcasting over all valid triplets per batch yields more efficient and effective contrast than precomputed lists. In the ablations, an “Offline” model that replicates NOMAD’s offline triplets but with MOS labels underperforms both 5 and SCOREQ. The same section states that online batch-all mining that contrasts all valid triplets is essential, whereas the adaptive margin provides only minor extra gains on top of batch-all. The main reported improvement comes from batch-all regression-aware mining (Ragano et al., 2024).
Practical guidance in SCOREQ also emphasizes batch composition. Larger batches are said to produce more valid triplets and more stable training, and the paper notes that MOS is often averaged over few raters, so batch-all relational constraints can statistically average out label noise. It further suggests that adaptive margins attenuate the effect of small, potentially noisy MOS differences (Ragano et al., 2024).
DNSMOS-C also uses MOS-guided triplets formed from each training batch, such that positives share similar MOS and negatives differ in MOS from the anchor, but it does not provide an explicit mining algorithm, hard/semi-hard criteria, MOS-difference thresholds, or batch size. Its algorithmic sketch therefore remains conceptual: compute embeddings and posterior parameters, form a set of MOS-guided triplets from the batch, compute Gaussian negative log-likelihood and triplet loss, and minimize their weighted sum (Liang et al., 25 Jun 2026).
4. Architectural realizations in speech quality assessment
SCOREQ
SCOREQ is implemented on raw waveforms trimmed to 4 seconds during training, with full lengths used at test time. Two backbones are reported. The first is wav2vec 2.0 BASE, consisting of a 7-layer 1D CNN feature encoder and a 12-layer Transformer, with only the Transformer finetuned and the CNN frozen. The second is w2vlight, a lighter variant with 4 Transformer layers trained from scratch. The encoder output is the mean over time of the last Transformer layer, 6, and the projection head is ReLU followed by a fully connected layer to a 256-dimensional embedding 7 (Ragano et al., 2024).
The loss is applied in a two-step pipeline. In step 1, contrastive regression pretraining applies the SCOREQ loss to 8 so that distances are ordered consistently with MOS. In step 2, two evaluation modes are defined. In non-matching reference (NMR) mode, inference uses distance to non-matching reference clean speech,
9
which is used for ranking and as a differentiable perceptual loss. In no-reference (NR) mode, the encoder 0 is frozen after SCOREQ training, 1 is discarded, and a linear MOS head 2 is trained on 3 with
4
The baseline 5 model instead attaches a single linear output head directly to 6 and trains end-to-end with 7, without the contrastive pretraining (Ragano et al., 2024).
Training details are explicitly given. SCOREQ pretraining uses Adam, learning rate 8 for the Transformer and 9 for the projection head, batch size 128, exponential decay of 0 every 10 epochs without validation improvement, and early stopping on Spearman correlation in NMR mode on NISQA VAL SIM with patience 100 epochs. For NMR validation, 200 random clean utterances from LibriSpeech dev-clean are used as references. No data augmentation is reported. In NR MOS-head training, 1 is frozen, 2 is discarded, and 3 is trained with 4 on the same domain as step 1. The baseline 5 model uses grid search to choose learning rate and batch size, with best found values batch size 64 and learning rate 0.01 (Ragano et al., 2024).
DNSMOS-C
DNSMOS-C introduces MOS-guided triplet-based contrastive loss into the DNSMOS Pro framework. Audio clips are downsampled to 16 kHz and padded or cropped to 10 seconds. Log-magnitude spectrograms are computed using a 20 ms Hann window with 10 ms hop and then clipped to the range 6. The encoder consists of four convolutional layers followed by a global max-pooling layer and outputs a 64-dimensional embedding vector 7. A head with three fully connected layers and a final linear layer predicts the parameters of a Gaussian posterior over MOS, namely mean 8 and variance 9 (Liang et al., 25 Jun 2026).
The probabilistic regression term is
0
with Gaussian negative log-likelihood
1
The contrastive term is applied directly to the 64-dimensional encoder embeddings, with Euclidean distance on raw embeddings and no normalization:
2
where 3 in all experiments. The total objective is
4
with 5 (Liang et al., 25 Jun 2026).
DNSMOS-C’s stated distinction from SCOREQ is architectural and procedural. It applies triplet-based supervision directly to the encoder’s intermediate embedding while training the probabilistic MOS regressor end-to-end in a single stage. Inference remains identical to DNSMOS Pro, predicting 6 and 7 and using 8 as the MOS estimate. The paper reports no additional computational overhead at deployment, while noting that parameter counts and inference FLOPs are not reported (Liang et al., 25 Jun 2026).
5. Empirical behavior, latent geometry, and generalization
SCOREQ reports two kinds of evidence: embedding-space analyses and cross-domain benchmarking. In the embedding analysis, finetuning wav2vec 2.0 with 9 produces PCA-projected representations that cluster by degradation rather than by MOS. On TCD-VoIP, the 0 embeddings have higher Normalized Mutual Information with degradation labels, with 1, and lower Pearson correlation between embedding distance and MOS, with 2. SCOREQ embeddings reverse this pattern, yielding 3 and 4–5, which the paper interprets as evidence that distances are ordered by MOS rather than degradation type (Ragano et al., 2024).
The cross-domain evaluation spans 11 test sets covering simulated telephone degradations, real phone calls, codecs and transcoding, speech enhancement, Chinese reverberation, and speech synthesis. The paper states that state-of-the-art no-reference metrics trained with supervised 6, or trained on proxy labels, perform well in-domain but degrade on out-of-distribution and out-of-domain data. It gives concrete examples: on TENCENT-Rev, NISQA yields 7, NR-PESQ 8, NR-SI-SDR 9, and NORESQA-MOS 0, whereas SCOREQ in NR mode achieves 1; on VoiceMOS Test 1, NISQA has 2 and NORESQA-MOS 3, versus NR-SCOREQ 4 (Ragano et al., 2024).
Controlled comparisons against the 5 baseline show that the reported gains are concentrated in ODS and ODM settings. When trained on D1 and evaluated in NR mode, VoiceMOS Test 2 improves from 6 to 7, with RMSE dropping from 8 to 9; TENCENT-Rev improves from 0 to 1, with RMSE from 2 to 3; TCD-VoIP improves from 4 to 5, with RMSE from 6 to 7; and NOIZEUS improves from 8 to 9, with RMSE from 0 to 1. The paper states that in-domain sets are similar or slightly improved, confirming that generalization is where SCOREQ helps most (Ragano et al., 2024).
In NMR mode, encoder distances to clean non-matching references also correlate strongly with MOS across domains. On TCD-VoIP, SCOREQ reports 2 and 3, compared with the 4 encoder at 5 and 6, which the paper interprets as confirming that SCOREQ learns a MOS-ordered manifold already at 7 (Ragano et al., 2024).
DNSMOS-C reports a related pattern in a smaller end-to-end model. On in-domain experiments averaged over 10 runs, BVCC yields 8 versus 9, 00 versus 01, and 02 versus 03 for DNSMOS-C versus DNSMOS Pro. On Tencent, it reports 04 versus 05, 06 versus 07, and 08 versus 09. On NISQA_TRAIN/VAL_SIM, MSE is slightly higher at 10 versus 11, but LCC and SRCC are slightly improved at 12 versus 13 and 14 versus 15 (Liang et al., 25 Jun 2026).
Its out-of-domain results are presented as consistent improvements in correlation-based metrics with MSE generally comparable. For models trained on NISQA_TRAIN/VAL_SIM, DNSMOS-C improves on NISQA_TEST_FOR from 16 and 17 to 18 and 19; on NISQA_TEST_P501 from 20 and 21 to 22 and 23; and remains on par on NISQA_TEST_LIVETALK at 24 and 25 (Liang et al., 25 Jun 2026).
Both papers provide latent-space interpretations. SCOREQ reports reduced degradation clustering and stronger MOS-distance alignment. DNSMOS-C reports stronger low-dimensional quality ordering on unseen TCD-VoIP, where the multiple correlation 26 between MOS and the first two principal components rises from 27 to 28 for BVCC training, from 29 to 30 for NISQA training, and from 31 to 32 for Tencent training. PCA plots are said to show that PC1 aligns more strongly with MOS while clusters of specific distortions become less distinct (Liang et al., 25 Jun 2026).
6. Interpretation, scope, and limitations
The principal interpretation given in SCOREQ is that ordering rather than pointwise fitting is the decisive inductive bias. The loss imposes margin-separated constraints that push negatives away and pull positives closer relative to anchors, with the adaptive variant modulating the strength by MOS gap. Over many anchors in a batch, this is said to yield a consistent ordering that survives domain shifts (Ragano et al., 2024). DNSMOS-C expresses a closely related view, arguing that the contrastive signal reorients the latent space toward perceptual quality and that the emergent low-dimensional ordering enhances interpretability and improves training stability (Liang et al., 25 Jun 2026).
Several practical and conceptual limitations are explicitly stated. SCOREQ is evaluated on speech domains, specifically simulated degradations and synthesis, and with two backbones. Although the authors argue that the approach is general to regression, they do not test beyond speech. The method also incurs slight execution-time overhead relative to 33 because of batch-all computations: measured per-batch time on a Tesla V100 is approximately 34 s for 35 versus approximately 36 s for SCOREQ at batch size 128 (Ragano et al., 2024). DNSMOS-C emphasizes that deployment complexity and cost are unchanged at inference, but it also notes that batch size, explicit triplet mining thresholds, and MOS-dependent weighting or margins are not reported, which constrains exact replication (Liang et al., 25 Jun 2026).
The treatment of margins differs across implementations and should not be conflated. SCOREQ defines both a fixed-margin and an adaptive MOS-aware margin, and reports that adaptive margins provide only minor incremental gains over batch-all mining. DNSMOS-C, by contrast, uses the standard triplet form with Euclidean distance and 37 in all experiments, with no additional weighting or MOS-dependent margin (Ragano et al., 2024, Liang et al., 25 Jun 2026). A common misconception would therefore be to assume that “MOS-guided triplet-based contrastive loss” necessarily implies adaptive margining or multi-stage training. The reported literature instead shows a broader design space united by MOS-guided triplet formation.
The same caution applies to backbone choice. SCOREQ uses large self-supervised encoders and a separate projection head, whereas DNSMOS-C explicitly frames its contribution as avoiding large SSL encoders and multi-stage procedures. This suggests that the essential ingredient is not a specific encoder family, but the imposition of MOS-derived relational constraints on an embedding space (Ragano et al., 2024, Liang et al., 25 Jun 2026).
Future directions are named explicitly in SCOREQ. Cross-domain NR training is not explored, and the authors state that training the encoder with SCOREQ on one domain and learning the MOS mapping on another would be valuable. They also propose that MOS-guided triplet loss is applicable to many regression tasks where target differences define closeness, including image, video, and audio perceptual quality scores, medical severity scales, and aesthetic ratings. The NMR formulation is additionally presented as a differentiable perceptual loss usable in training enhancement, coding, or synthesis models (Ragano et al., 2024). DNSMOS-C’s results suggest that similar extensions may be possible in compact end-to-end settings, although such applications are not evaluated directly (Liang et al., 25 Jun 2026).