GlitchMiner: Mining Glitch Tokens in Large Language Models via Gradient-based Discrete Optimization
Not on the map. Why?
Abstract (arXiv)
Glitch tokens, inputs that trigger unpredictable or anomalous behavior in Large Language Models (LLMs), pose significant challenges to model reliability and safety. Existing detection methods primarily rely on heuristic embedding patterns or statistical anomalies within internal representations, limiting their generalizability across different model architectures and potentially missing anomalies that deviate from observed patterns. We introduce GlitchMiner, an behavior-driven framework designed to identify glitch tokens by maximizing predictive entropy. Leveraging a gradient-guided local search strategy, GlitchMiner efficiently explores the discrete token space without relying on model-specific heuristics or large-batch sampling. Extensive experiments across ten LLMs from five major model families demonstrate that GlitchMiner consistently outperforms existing approaches in detection accuracy and query efficiency, providing a generalizable and scalable solution for effective glitch token discovery. Code is available at [https://github.com/wooozihu/GlitchMiner]
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 17 of its 31 references that are in the map. First posted on arXiv 19 Oct 2024.
Builds on
17 of 31 references.
References · 17
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Mistral 7Bcited by 3,065
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 2,914
- 2024Qwen2 Technical Reportcited by 2,076
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
- 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,883
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2018From Louvain to Leiden: guaranteeing well-connected communitiescited by 379
- 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 329
- 2024Large Language Models for Education: A Survey and Outlookcited by 185
5 more
- 2024Coercing LLMs to do and reveal (almost) anythingcited by 88
- 2023LLMs Accelerate Annotation for Medical Information Extractioncited by 77
- 2024Fishing for Magikarp: Automatically Detecting Under-trained Tokens in Large Language Modelscited by 45
- 2024Glitch Tokens in Large Language Models: Categorization Taxonomy and Effective Detectioncited by 27
- 2024GlitchProber: Advancing Effective Detection and Mitigation of Glitch Tokens in Large Language Modelscited by 3
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.
- 2025ShadowCoT: Cognitive Hijacking for Stealthy Reasoning Backdoors in LLMscited by 23
- 2025Addressing Tokenization Inconsistency in Steganography and Watermarking Based on Large Language Modelscited by 3
- 2026Check Your LLM's Secret Dictionary! Five Lines of Code Reveal What Your LLM Learned (Including What It Shouldn't Have)cited by 0
- 2026Check Your LLM's Secret Dictionary! Five Lines of Code Reveal What Your LLM Learned (Including What It Shouldn't Have)21 May 2026
- 2025Addressing Tokenization Inconsistency in Steganography and Watermarking Based on Large Language Models28 Aug 2025
- 2025ShadowCoT: Cognitive Hijacking for Stealthy Reasoning Backdoors in LLMs8 Apr 2025