SyntaxBench: A Statistical Diagnostic Framework for Character-Level Reasoning in Large Language Models
Mohsen Larni, Sobhan Ebrahimi Azar, Pouyan Nahed, Kazem Taghva
Abstract
Large language models are increasingly used where small syntactic errors matter, yet character-level reasoning is still evaluated mostly through isolated probes and aggregate accuracy. We introduce SyntaxBench, a diagnostic benchmark and statistical evaluation framework for character-level reasoning. It contains five core tasks, character counting, letter containment, palindrome detection, edit distance, and longest-string selection, plus indextospan, a harder substring-extraction stress test. The five core tasks use paired English and character-length-matched random-string inputs. indextospan documents share a 200-500 word band and are not character-length matched. All six tasks use zero-, one-, and four-shot prompts. We evaluate eight open-weight models from 2B to 32B parameters across 11 reasoning-mode configurations. The framework reports exact-match and relaxed accuracy, Cohen's kappa, paired McNemar tests with odds ratios, bootstrap confidence intervals, Kendall's tau, class-conditional metrics, tokenization analysis, and multiple-comparison-corrected tests. Three findings stand out. First, tokenization shapes accuracy: random strings are more character-visible than English strings (1.892 vs. 3.169 characters per token), and character-counting accuracy falls as English words occupy more tokens. Second, reasoning mode is not uniformly helpful: Gemma4-31B is nearly unchanged across modes on the near-saturated tasks, while Qwen3.6-27B is worse with thinking on palindrome detection (0.952 non-thinking vs. 0.886 thinking at four-shot). Third, indextospan remains largely unsolved; the best four-shot exact-match accuracy is 6.75%. Character-level evaluation needs controlled inputs, paired tests, and analyses of tokenization and reasoning mode rather than aggregate accuracy alone.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI, cs.LG
- Comments
- 32 pages, 17 figures. The first two authors contributed equally. The code will be released soon
Related papers
ASCENT: A Benchmark for Evaluating and Advancing Stepwise Diagnostic Reasoning in Large Language Models on Common Clinical Scenarios
Shared title terminologycs.CLYera Choi, Yeong Hwa Kim, Jaedeok Lee et al.
Breaking the Tie: A Cluster-Aware Routing Framework for Large Language Models
Shared title terminologycs.CLYao Lu, Zhaiyuan Ji, Yaxin Gao et al.
A rubric landscape for evaluating clinical reasoning in large language models: what exists, what is missing, and what needs to be combined
Shared title terminologycs.CLZhangshu Joshua Jiang, Zina Ibrahim, James T. Teo
Evaluating Large Language Models on conversational African American English: Feature classification and next-turn generation
Shared title terminologycs.CLRomeo De Timmerman, Thomas Demeester, Els Lefever
When the Knowledge Runs Out: A Part-Level Pilot Evaluation of How Language Models Handle Partially Covered Questions
Shared title terminologycs.CLVahid Mohammadi
Evaluating Latent Knowledge Stability in Multimodal Large Language Models
Shared title terminologycs.CLChuancheng Shi, Shangze Li, Wenhua Wu et al.