mlsanityData to 14 Oct 2026

Understanding Secret Leakage Risks in Code LLMs: A Tokenization Perspective

arXiv 2604.17814 ↗First posted 20 Apr 2026cs.CR cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Code secrets are sensitive assets for software developers, and their leakage poses significant cybersecurity risks. While the rapid development of AI code assistants powered by Code Large Language Models (CLLMs), CLLMs are shown to inadvertently leak such secrets due to a notorious memorization phenomenon. This study first reveals that Byte-Pair Encoding (BPE) tokenization leads to unexpected behavior of secret memorization, which we term as textitgibberish bias. Specifically, we identified that some secrets are among the easiest for CLLMs to memorize. These secrets yield high character-level entropy, but low token-level entropy. Then, this paper supports the biased claim with numerical data. We identified that the roots of the bias are the token distribution shift between the CLLM training data and the secret data. We further discuss how gibberish bias manifests under the ``larger vocabulary'' trend. To conclude the paper, we discuss potential mitigation strategies and the broader implications on current tokenizer design.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 21 of its 43 references that are in the map. First posted on arXiv 20 Apr 2026.

Builds on

21 of 43 references.

References · 21

  1. 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
  2. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
  3. 2020Extracting Training Data from Large Language Modelscited by 2,189
  4. 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,989
  5. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  6. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
  7. 2024Dolma: an Open Corpus of Three Trillion Tokens for Language Model Pretraining Researchcited by 483
  8. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 431
  9. 2023Language Model Tokenizers Introduce Unfairness Between Languagescited by 214
  10. 2024Scaling Laws with Vocabulary: Larger Models Deserve Larger Vocabulariescited by 118
  11. 2025Over-Tokenized Transformer: Vocabulary is Generally Worth Scalingcited by 44
  12. 2025Universal Cross-Tokenizer Distillation via Approximate Likelihood Matchingcited by 41
9 more
  1. 2024From Language Models over Tokens to Language Models over Characterscited by 31
  2. 2023Your Code Secret Belongs to Me: Neural Code Completion Tools Can Memorize Hard-Coded Credentialscited by 17
  3. 2024Theoretical Analysis of Byte-Pair Encodingcited by 16
  4. 2022To What Extent do Deep Learning-based Code Recommenders Generate Predictions by Cloning Code from the Training Set?cited by 11
  5. 2023The (ab)use of Open Source Code to Train Large Language Modelscited by 10
  6. 2024Decoding Secret Memorization in Code LLMs Through Token-Level Characterizationcited by 9
  7. 2024Adapters for Altering LLM Vocabularies: What Languages Benefit the Most?cited by 9
  8. 2023SecretBench: A Dataset of Software Secretscited by 5
  9. 2025TokDrift: When LLM Speaks in Subwords but Code Speaks in Grammarcited by 2

Built on by

Not cited yet.