Update README.md
Browse files7 unmodified lines891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495961 unmodified line98991001011021031041051061071081091101111 unmodified line1131141151161171181191 unmodified line1211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801818 unmodified lines1901911921931941951961971981992002012022032047 unmodified lines- voxceleb---<p align="center"><b>Junjie Li</b>, <b>Yang Xiao</b>,<b> Kong Aik Lee <br><i>The Hong Kong Polytechnic University</i> <br><i>The University of Melbourne, Australia</i></p><p align="center"><a href="https://arxiv.org/abs/2601.15719"><img src="https://img.shields.io/badge/arXiv-2308.08143-b31b1b.svg"/></a></p>This model card presents a SpeechBrain-style release for our uncertainty-aware speaker recognition work:1. **$\mathcal{U}^3$-xi: Pushing the Boundaries of Speaker Recognition via Incorporating Uncertainty**2. **Towards Robust Uncertainty-Aware Speaker Modeling**## Model DescriptionUncertainty-aware speaker modeling extends conventional speaker embedding systems by estimating and using uncertainty during representation learning, training, and scoring. The model family builds on common speaker-recognition backbones such as ECAPA-TDNN, ResNet34, and ReDimNet-B2, and adds uncertainty-aware components to improve robustness on both in-domain and cross-domain speaker verification.The first work introduces the $\mathcal{U}^3$-xi framework, which incorporates uncertainty into speaker recognition through:- **Uncertainty Estimation Module** based on multi-view self-attention (MVA)- **Global Uncertainty Supervision** by incorporating uncertainty into the scale factor- **Uncertainty-aware cosine scoring**The third work improves this direction with robust uncertainty-aware speaker modeling, especially through:- **Inter- and Intra-Speaker-Aware Uncertainty Softmax**- **Uncertainty-Calibrated Domain Adaptation (UCDA)**At the current repository stage, the implemented part of the third work is **Inter- and Intra-Speaker-Aware Uncertainty Softmax**.## Intended UseThis release is intended for research on:- Speaker verification- Speaker embedding learning- Uncertainty-aware speaker recognition- Robust speaker modeling under in-domain and cross-domain evaluation- Margin-based speaker classification losses with uncertainty modelingIt is not intended as a turnkey biometric identity product. Any deployment for real user authentication should include additional calibration, privacy review, fairness evaluation, and domain-specific validation.## Implementation HighlightsThe implementation is based on the WeSpeaker codebase and can be adapted into SpeechBrain recipes or checkpoints. The main implemented components are:- **$\mathcal{U}^3$-xi pooling**: uncertainty-aware utterance-level speaker pooling- **Multi-view self-attention (MVA)**: auxiliary module for uncertainty estimation- **Uncertainty-aware margin losses**: uncertainty-aware variants of AAM-Softmax, AM-Softmax, and SphereFace2- **Inter-/intra-speaker uncertainty modeling**: improved softmax variants from the third work- **Uncertainty-aware cosine scoring**: scoring with uncertainty information when enabledKey implementation references in the source repository:- `U_Cube_XI`: `wespeaker/models/pooling_layers.py`- `ArcMarginProduct_uncertainty`: `wespeaker/models/projections.py`- `ArcMarginProduct_uncertainty_inter_intra`: `wespeaker/models/projections.py`- `AddMarginProduct_uncertainty_inter_intra`: `wespeaker/models/projections.py`- `SphereFace2_uncertainty_Arcguide_inter_intra`: `wespeaker/models/projections.py`## InstallationClone the repository and install the dependencies:```bashgit clone https://github.com/mrjunjieli/wespeaker_u_cube.gitcd wespeaker_u_cubepip install -r requirements.txtpip install -e .```For a SpeechBrain-style workflow, install SpeechBrain in the same environment if you plan to wrap these checkpoints or recipes with SpeechBrain interfaces:```bashpip install speechbrain```## TrainingThe VoxCeleb experiments are located in:1 unmodified lineexamples/voxceleb/v2```Example training entry point:```bashcd examples/voxceleb/v2bash run.sh --stage 1 --stop_stage 5 --config conf/ecapa_tdnn_u_cube.yaml```Other uncertainty-aware configs include:```textconf/ecapa_tdnn_u_cube.yaml1 unmodified lineconf/redimnet_u_cube.yaml```For the third work, use the inter-/intra-speaker uncertainty-aware projection types implemented in `wespeaker/models/projections.py`, such as:```textarc_margin_uncertainty_inter_intra1 unmodified linesphereface2_uncertainty_arcguide```## Inference and ScoringA typical evaluation workflow extracts embeddings and then scores verification trials:```bashcd examples/voxceleb/v2bash run.sh --stage 6 --stop_stage 6 --config conf/ecapa_tdnn_u_cube.yaml```For uncertainty-aware scoring, use the uncertainty extraction and scoring utilities in the VoxCeleb recipe:```bashlocal/extract_vox_uncertainty.sh --exp_dir <exp_dir>local/score_uncertainty.sh --exp_dir <exp_dir>```Replace `<exp_dir>` with the experiment directory containing the trained model and extracted embeddings.## ResultsThe table below summarizes representative results from the README for the first and third works. Lower EER and minDCF are better.### $\mathcal{U}^3$-xi Results| Model | Params | Vox1-O EER | Vox1-E EER | Vox1-H EER ||:--|:--:|:--:|:--:|:--:|| ECAPA-TDNN c512 baseline | 6.19M | 1.069 | 1.209 | 2.310 || ECAPA-TDNN c512 + $\mathcal{U}^3$-xi | 6.7M | 0.782 | 1.016 | 1.888 || ResNet34 baseline | 6.63M | 0.867 | 1.049 | 1.960 || ResNet34 + $\mathcal{U}^3$-xi | 7.9M | 0.867 | 0.868 | 1.641 || ReDimNet-B2 baseline | 4.89M | 0.782 | 0.907 | 1.667 || ReDimNet-B2 + $\mathcal{U}^3$-xi | 5.5M | 0.606 | 0.779 | 1.494 |### Robust Uncertainty-Aware Speaker Modeling ResultsThe third work improves uncertainty-aware training with inter-/intra-speaker-aware softmax variants. Representative results include:| Backbone | Loss | Uncertainty-aware cosine | Vox1-O EER | Vox1-E EER | Vox1-H EER | CNCeleb EER ||:--|:--|:--:|:--:|:--:|:--:|:--:|| ECAPA512 + $\mathcal{U}^3$-xi | UAAM-Softmax inter-intra | Yes | 0.840 | 0.965 | 1.833 | 10.781 || ECAPA512 + $\mathcal{U}^3$-xi | UAM-Softmax inter-intra | Yes | 0.808 | 0.991 | 1.794 | 9.411 || ECAPA512 + $\mathcal{U}^3$-xi | USphereFace2 inter-intra | Yes | 0.739 | 0.965 | 1.771 | 10.560 || ResNet34 + $\mathcal{U}^3$-xi | UAAM-Softmax inter-intra | Yes | 0.813 | 0.847 | 1.532 | 9.631 || ReDimNet-B2 + $\mathcal{U}^3$-xi | UAAM-Softmax inter-intra | Yes | 0.627 | 0.758 | 1.434 | 8.607 || ReDimNet-B2 + $\mathcal{U}^3$-xi | USphereFace2 inter-intra | Yes | 0.622 | 0.774 | 1.433 | 11.899 |## Limitations- The current third-work implementation includes **Inter- and Intra-Speaker-Aware Uncertainty Softmax**; UCDA is described as part of the work but is not currently provided in the repository.- Results depend on the VoxCeleb recipe, preprocessing, augmentation, training schedule, and scoring setup.- The older pretrained checkpoints from the first work are not recommended as the main release target for this card because the third work supersedes them.## CitationIf you use this work, please cite the related papers:```bibtex@article{li2026ucubexi,8 unmodified lines@article{li2026robustuncertainty,title={Towards Robust Uncertainty-Aware Speaker Modeling},author={Li, Junjie and Lee, Kong Aik},journal={arXiv preprint},year={2026}}```## ContactFor questions, please contact:```textjunjie98.li@connect.polyu.hk```7 unmodified lines8910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091921 unmodified line9495969798991001011021031041051061071081091101111 unmodified line1131141151161171181191201211 unmodified line1231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941958 unmodified lines2042052062072082092102112122132142152167 unmodified lines- voxceleb---# ๐๏ธ Uncertainty-Aware Speaker RecognitionThis project provides uncertainty-aware speaker recognition models based onECAPA-TDNN, ResNet34, and ReDimNet-B2.The core idea is to estimate the uncertainty of speaker embeddings and use itduring representation learning, classification, and verification scoring.This allows the model to distinguish between reliable and unreliable speechsegments, improving robustness in both in-domain and cross-domain speakerverification.The implementation is based on the following two works:- [$\mathcal{U}^3$-xi: Pushing the Boundaries of Speaker Recognition via Incorporating Uncertainty](https://arxiv.org/abs/2601.15719)- [Towards Robust Uncertainty-Aware Speaker Modeling](https://arxiv.org/abs/2607.04937)The current release focuses on uncertainty-aware speaker embedding learningand speaker verification. The implementation is based on the[WeSpeaker](https://github.com/wenet-e2e/wespeaker) codebase.## โจ Key HighlightsThe main components of this project include:- **Uncertainty-aware speaker embedding learning**- **Uncertainty estimation based on multi-view self-attention**- **Uncertainty-aware pooling and classification**- **Inter- and intra-speaker-aware uncertainty modeling**- **Uncertainty-aware cosine scoring**> **Note:** The current repository provides the implementation of> inter-/intra-speaker-aware uncertainty softmax. The> Uncertainty-Calibrated Domain Adaptation (UCDA) method is described in the> paper but is not currently included in this release.## ๐ฆ InstallationClone the repository and install the dependencies:```bashgit clone https://github.com/mrjunjieli/wespeaker_u_cube.gitcd wespeaker_u_cubepip install -r requirements.txtpip install -e .```If you plan to use SpeechBrain interfaces or recipes:```bashpip install speechbrain```## ๐พ Pre-trained CheckpointsThe following pre-trained models are available for theinter-/intra-speaker-aware uncertainty modeling experiments.> The download links are also embedded in the corresponding loss names in the> results table. They are highlighted here separately for easier access.### ECAPA512- **[UAAM-Softmax inter-intra](https://drive.google.com/drive/folders/1PcI8UM5blXePt2ZCnyNycnj0co5a2XLa?usp=sharing)**- **[UAM-Softmax inter-intra](https://drive.google.com/drive/folders/1t9SOt2XlNk4RGV8Q5TfEjZb2iUltIWJl?usp=sharing)**- **[USphereFace2 inter-intra](https://drive.google.com/drive/folders/1Luy6GQ7OBWhdbfTkLcgSN7QV4bz2dl0W?usp=sharing)**### ResNet34- **[UAAM-Softmax inter-intra](https://drive.google.com/drive/folders/1c9ohIlh6re-R4MdqW3x2wGb6nGvyq6Au?usp=sharing)**### ReDimNet-B2- **[UAAM-Softmax inter-intra](https://drive.google.com/drive/folders/1vROZR5yv-CG897qEguFXR9xRBvZjQ590?usp=sharing)**- **[USphereFace2 inter-intra](https://drive.google.com/drive/folders/17CKqWU2bq4ugsNpFU2DYxCgbh1te5ikT?usp=sharing)**The models listed above were re-trained. Therefore, results obtained fromthese checkpoints may be slightly different from those reported in the paper.## ๐๏ธ TrainingThe VoxCeleb experiments are located in:1 unmodified lineexamples/voxceleb/v2```An example training command is:```bashcd examples/voxceleb/v2bash run.sh \--stage 1 \--stop_stage 5 \--config conf/ecapa_tdnn_u_cube.yaml```Available uncertainty-aware configurations include:```textconf/ecapa_tdnn_u_cube.yaml1 unmodified lineconf/redimnet_u_cube.yaml```For inter-/intra-speaker-aware uncertainty modeling, use the correspondingprojection types implemented in`wespeaker/models/projections.py`:```textarc_margin_uncertainty_inter_intra1 unmodified linesphereface2_uncertainty_arcguide```## ๐ Results<table style="border-collapse: collapse; border-top: 3px solid #000; border-bottom: 3px solid #000;"><thead><tr><th rowspan="2">Model</th><th rowspan="2"># Param.</th><th rowspan="2">Loss</th><th rowspan="2">Uncertainty-aware cosine score</th><th colspan="7">In-domain</th><th colspan="3">Cross-domain</th></tr><tr><th colspan="2">Vox1-O</th><th colspan="2">Vox1-E</th><th colspan="2">Vox1-H</th><th rowspan="2">RI (%)</th><th colspan="2">CNCeleb</th><th rowspan="2">RI (%)</th></tr><tr><th colspan="4"></th><th>EER</th><th>minDCF</th><th>EER</th><th>minDCF</th><th>EER</th><th>minDCF</th><th>EER</th><th>minDCF</th></tr></thead><tbody><tr style="border-top: 6px double #000;"><td rowspan="11">ECAPA512</td><td rowspan="11">6.19 M</td><td>AAM-Softmax</td><td>No</td><td>1.069</td><td>0.122</td><td>1.209</td><td>0.136</td><td>2.310</td><td>0.226</td><td>Benchmark</td><td>15.314</td><td>0.633</td><td>Benchmark</td></tr><tr style="border-top: 3px solid #000;"><td rowspan="2">UAAM-Softmax</td><td>No</td><td>0.856</td><td>0.109</td><td>1.064</td><td>0.121</td><td>1.982</td><td>0.195</td><td>13.57</td><td>13.706</td><td>0.608</td><td>7.23</td></tr><tr style="border-top: 3px solid #000;"><td>Yes</td><td>0.782</td><td>0.100</td><td>1.016</td><td>0.115</td><td>1.888</td><td>0.187</td><td>18.64</td><td>10.271</td><td>1.000</td><td>-12.52</td></tr><tr style="border-top: 3px solid #000;"><td rowspan="2"><a href="https://drive.google.com/drive/folders/1PcI8UM5blXePt2ZCnyNycnj0co5a2XLa?usp=sharing">UAAM-Softmax inter-intra</a></td><td>No</td><td>0.936</td><td>0.102</td><td>1.050</td><td>0.122</td><td>1.978</td><td>0.195</td><td>13.40</td><td>13.974</td><td>0.581</td><td>8.48</td></tr><tr style="border-top: 3px solid #000;"><td>Yes</td><td>0.840</td><td>0.086</td><td><strong>0.965</strong></td><td>0.110</td><td>1.833</td><td>0.189</td><td><strong>21.22</strong></td><td>10.781</td><td>0.835</td><td>-1.16</td></tr><tr style="border-top: 3px solid #000;"><td>AM-Softmax</td><td>No</td><td>1.005</td><td>0.107</td><td>1.206</td><td>0.133</td><td>2.254</td><td>0.221</td><td>Benchmark</td><td>14.162</td><td>0.611</td><td>Benchmark</td></tr><tr style="border-top: 3px solid #000;"><td rowspan="2"><a href="https://drive.google.com/drive/folders/1t9SOt2XlNk4RGV8Q5TfEjZb2iUltIWJl?usp=sharing">UAM-Softmax inter-intra</a></td><td>No</td><td>0.888</td><td>0.099</td><td>1.076</td><td>0.119</td><td>1.973</td><td>0.186</td><td>11.46</td><td>12.436</td><td>0.553</td><td><strong>10.84</strong></td></tr><tr style="border-top: 3px solid #000;"><td>Yes</td><td>0.808</td><td><strong>0.084</strong></td><td>0.991</td><td>0.109</td><td>1.794</td><td><strong>0.178</strong></td><td>19.46</td><td><strong>9.411</strong></td><td>1.000</td><td>-15.03</td></tr><tr style="border-top: 3px solid #000;"><td>SphereFace2</td><td>No</td><td>0.963</td><td>0.108</td><td>1.121</td><td>0.125</td><td>1.967</td><td>0.199</td><td>Benchmark</td><td>12.582</td><td>0.573</td><td>Benchmark</td></tr><tr style="border-top: 3px solid #000;"><td rowspan="2"><a href="https://drive.google.com/drive/folders/1Luy6GQ7OBWhdbfTkLcgSN7QV4bz2dl0W?usp=sharing">USphereFace2 inter-intra</a></td><td>No</td><td>0.856</td><td>0.104</td><td>1.035</td><td>0.119</td><td>1.918</td><td>0.196</td><td>5.21</td><td>12.265</td><td><strong>0.550</strong></td><td>3.27</td></tr><tr style="border-top: 3px solid #000;"><td>Yes</td><td><strong>0.739</strong></td><td>0.102</td><td><strong>0.965</strong></td><td><strong>0.108</strong></td><td><strong>1.771</strong></td><td><strong>0.178</strong></td><td>12.81</td><td>10.560</td><td>0.624</td><td>3.59</td></tr><tr style="border-top: 6px double #000;"><td rowspan="7">ResNet34</td><td rowspan="7">6.63 M</td><td>AAM-Softmax</td><td>No</td><td>0.867</td><td>0.091</td><td>1.049</td><td>0.121</td><td>1.960</td><td>0.192</td><td>Benchmark</td><td>11.090</td><td><strong>0.488</strong></td><td>Benchmark</td></tr><tr style="border-top: 3px solid #000;"><td rowspan="2">UAAM-Softmax</td><td>No</td><td>0.888</td><td>0.085</td><td>0.900</td><td>0.099</td><td>1.712</td><td>0.175</td><td>9.68</td><td>11.732</td><td>0.513</td><td>-5.46</td></tr><tr style="border-top: 3px solid #000;"><td>Yes</td><td>0.867</td><td>0.078</td><td>0.868</td><td>0.095</td><td>1.641</td><td>0.172</td><td>13.29</td><td>10.082</td><td>0.541</td><td>-0.89</td></tr><tr style="border-top: 3px solid #000;"><td rowspan="2"><a href="https://drive.google.com/drive/folders/1c9ohIlh6re-R4MdqW3x2wGb6nGvyq6Au?usp=sharing">UAAM-Softmax inter-intra</a></td><td>No</td><td>0.904</td><td><strong>0.070</strong></td><td>0.933</td><td>0.098</td><td>1.658</td><td><strong>0.165</strong></td><td>13.06</td><td>12.116</td><td>0.505</td><td>-6.37</td></tr><tr style="border-top: 3px solid #000;"><td>Yes</td><td><strong>0.813</strong></td><td>0.075</td><td><strong>0.847</strong></td><td><strong>0.091</strong></td><td><strong>1.532</strong></td><td>0.167</td><td><strong>17.12</strong></td><td><strong>9.631</strong></td><td>0.539</td><td><strong>1.35</strong></td></tr><tr style="border-top: 3px solid #000;"><td rowspan="2">USphereFace2</td><td>No</td><td>1.483</td><td>0.148</td><td>1.451</td><td>0.156</td><td>2.112</td><td>0.206</td><td>-36.00</td><td>11.441</td><td>0.512</td><td>-4.04</td></tr><tr style="border-top: 3px solid #000;"><td>Yes</td><td>1.340</td><td>0.156</td><td>1.357</td><td>0.150</td><td>1.986</td><td>0.193</td><td>-30.19</td><td>10.949</td><td>0.499</td><td>-0.49</td></tr><tr style="border-top: 6px double #000;"><td rowspan="7">ReDimNet-B2</td><td rowspan="7">4.89 M</td><td>AAM-Softmax</td><td>No</td><td>0.782</td><td>0.064</td><td>0.907</td><td>0.097</td><td>1.667</td><td>0.162</td><td>Benchmark</td><td>12.385</td><td>0.552</td><td>Benchmark</td></tr><tr style="border-top: 3px solid #000;"><td rowspan="2">UAAM-Softmax</td><td>No</td><td>0.649</td><td>0.073</td><td>0.801</td><td>0.089</td><td>1.532</td><td>0.153</td><td>6.09</td><td>13.464</td><td>0.552</td><td>-4.36</td></tr><tr style="border-top: 3px solid #000;"><td>Yes</td><td><strong>0.606</strong></td><td>0.065</td><td>0.779</td><td>0.091</td><td>1.494</td><td>0.157</td><td>9.12</td><td>9.479</td><td>1.000</td><td>-28.85</td></tr><tr style="border-top: 3px solid #000;"><td rowspan="2"><a href="https://drive.google.com/drive/folders/1vROZR5yv-CG897qEguFXR9xRBvZjQ590?usp=sharing">UAAM-Softmax inter-intra</a></td><td>No</td><td>0.686</td><td>0.070</td><td>0.802</td><td>0.090</td><td>1.536</td><td>0.151</td><td>6.06</td><td>12.132</td><td>0.516</td><td>4.28</td></tr><tr style="border-top: 3px solid #000;"><td>Yes</td><td>0.627</td><td>0.064</td><td><strong>0.758</strong></td><td>0.088</td><td>1.434</td><td>0.153</td><td>10.84</td><td><strong>8.607</strong></td><td>0.838</td><td>-10.65</td></tr><tr style="border-top: 3px solid #000;"><td rowspan="2"><a href="https://drive.google.com/drive/folders/17CKqWU2bq4ugsNpFU2DYxCgbh1te5ikT?usp=sharing">USphereFace2 inter-intra</a></td><td>No</td><td>0.622</td><td>0.052</td><td>0.776</td><td>0.085</td><td>1.440</td><td>0.146</td><td>14.92</td><td>12.081</td><td>0.515</td><td>4.58</td></tr><tr style="border-top: 3px solid #000;"><td>Yes</td><td>0.622</td><td><strong>0.051</strong></td><td>0.774</td><td><strong>0.084</strong></td><td><strong>1.433</strong></td><td><strong>0.145</strong></td><td><strong>15.56</strong></td><td>11.899</td><td><strong>0.506</strong></td><td><strong>6.13</strong></td></tr></tbody></table>## ๐ CitationIf you use this project, please cite the following papers:```bibtex@article{li2026ucubexi,8 unmodified lines@article{li2026robustuncertainty,title={Towards Robust Uncertainty-Aware Speaker Modeling},author={Li, Junjie and Lee, Kong Aik},journal={arXiv preprint arXiv:2607.04937},year={2026}}```## ๐ง ContactFor questions, please contact:junjie98.li@connect.polyu.hk
README.md+130-118