The π-xNovo transformer architecture includes two primary innovations. First, the model employs a joint masking strategy during training. In this approach, the input peptide sequence is subjected to a random boolean mask, and the encoded spectrum representation is subjected to two "soft" (i.e., real-valued) masks. These latter masks are produced by a perceptron that is itself learned during the training procedure. The use of two masks represents the notion that they may learn to capture complementary b-and y-ion series. Second, the decoder employs a multi-head attention mechanism that is designed to allow attention to accrue between each amino acid and all positions within the spectrum. This approach allows the model to explicitly indicate which peaks are responsible for each predicted amino acid, facilitating interpretability. In particular, the product of the peptide attention matrix and the spectrum attention matrix yields an interpretation matrix in which rows are predicted amino acids, columns are peaks in the spectrum, and values indicate high relevance of a given peak to a given predicted amino acid. The interpretation is a key component of an associated post-processing system, called "π-xNovo-QC," that combines the interpretation matrix with a set of rules to provide a confidence score for each prediction from π-xNovo.