An attention matrix is a two-dimensional map of weights between positions in two sequences. In text-to-speech, it relates audio frames to characters; a nearly diagonal pattern supports the assumption that text and audio progress together. section 9.2.2
Use the matrix as a practical diagnostic:
- Plot attention regularly during training and compare its shape with the expected alignment. section 9.2.2
- Apply guided attention loss when large deviations from the diagonal conflict with a known alignment assumption. section 9.2.2
- Treat moderate deviations as plausible timing variation, but investigate large residuals as signs of difficult sounds or character combinations. section 9.2.2
Diagnosing text-to-speech alignment
Stacy monitors attention plots during training. A near-diagonal matrix indicates that audio frames and characters align as expected; conspicuous residuals identify sounds or character combinations that may require targeted data collection. section 9.2.2
Figure 9.12 Attention plot evolution through training without (left) and with (right) guided attention loss
Compare attention-plot evolution with and without guided attention loss. section 9.2.2


