Reproduce “GlitchMiner: Mining Glitch Tokens in Large Language Models via Gradient-based Discrete Optimization” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Zihui Wu, Haichang Gao, Ping Wang, Shudong Zhang, Zhaoxiang Liu, Shiguo Lian
GlitchMiner uses next-token entropy and gradient-guided local search to prioritize vocabulary entries that may trigger anomalous behavior in language models. Across ten open-weight models from five families, it finds more verified glitch tokens than GlitchHunter and Magikarp under fixed search budgets, averaging 612 detections at 1,000 candidates and 980.1 at 2,000.
Key insights
- Verified glitch tokens consistently have higher average next-token entropy than normal tokens, making uncertainty a useful cross-model search signal rather than relying solely on fixed embedding anomalies.
- Restricting gradient search to local embedding neighborhoods improves the approximation used for candidate ranking; larger neighborhoods generally reduce detection performance.
- Entropy is a prioritization signal, not a sufficient glitch definition: some high-entropy candidates pass one or more behavioral checks and must be discarded during verification.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.