- Article
Users frequently reuse a password across websites with only minor modifications, so the compromise of one password lets an adversary guess the others by predicting the modification. Existing credential-tweaking models achieve limited accuracy. We present PassT5, which, to our knowledge, is the first application of the pre-trained T5 encoder–decoder Transformer to credential tweaking, framed as a sequence-to-sequence task. We fine-tune T5-Small on password-transformation pairs rebuilt from the 4iQ leak, keeping only pairs that represent a genuine modification, and measure the Success Rate at K (SR@K), the percentage of tweaked passwords guessed within the top-K candidates. Across three training runs under a user-level 70/15/15 split, PassT5 recovers 44.69% (±0.32) of passwords at , 56.51% (±0.11) at , and 62.80% (±0.39) at . An input-agnostic popularity baseline reaches only 0.68%, 1.40%, and 2.02% at , 100, and 1000, and a stronger input-dependent rule-based baseline 36.72%, 40.72%, and 41.26%, indicating that PassT5 learns password-specific transformations beyond both frequency and hand-crafted rules. The highest SR@1000 previously reported on 4iQ is 23.52% (PassTrans); because samples and splits differ, this is a same-dataset rather than controlled comparison, and on an unfiltered all-pairs benchmark PassT5 scores 18.36% versus PassTrans’s 23.52% at K = 1000, so its much larger tweak-only margin reflects the well-posed task rather than a universal model advantage. Encoder–decoder Transformers therefore model credential tweaking effectively and can inform stronger password defences.
26 November 2026


![Overview of the PassT5 pipeline. The data is split 70%/15%/15% for training, validation, and testing. SentencePiece tokenises each password (e.g., Admin2024! → [␣][Admin][20][24][!][</s>]); the T5 encoder–decoder is fine-tuned on these pairs, then samples candidate passwords for each input, which are deduplicated and ranked by sampling frequency to form the top-K list. Each candidate set is checked against the true password, and the results are aggregated into the Top-K Success Rate.](https://mdpi-res.com/cryptography/cryptography-10-00085/article_deploy/html/images/cryptography-10-00085-g001-550.jpg)






