Testing Processor Contracts in Speculative Decoding Engines
Tianyu Ding, Yaocheng Tong, Muzhi Yang, Lei Yang, Fei Jiang
Abstract
Speculative sampling can accelerate decoding without changing the target distribution. Its standard guarantee assumes that logits processors, which enforce constraints or modify token scores, receive the appropriate token prefix and state at each verification position. We formalize this processor-prefix contract and present BADC (branch-aware differential conformance testing). BADC combines enumerated references on tiny random models, checks of processor inputs and state, and simultaneous confidence bounds on output-event probabilities. Preregistered, source-informed experiments on selected Transformers and llama-cpp-python releases confirm two causes: processors read unverified drafts or advance state without rollback. For one pilot-selected prompt on a trained checkpoint, fresh samples give a 60.26-percentage-point lower bound on the difference in the probability of a predefined first-token event between ordinary and prompt-lookup decoding, with nominal simultaneous 95% coverage under within-arm i.i.d. sampling. Controlled comparisons establish no cause-recovery advantage of directed selection over random selection, while permutation testing detects each tested family at least as often as BADC. These findings connect processor-interface failures to observable decoding differences without establishing diagnostic superiority or workload prevalence.
Create a lesson
Related papers
Are We Just Applying LLMs? What SE Research Studies, Underexplores, and Could Do Next in the LLM Era
Zeinadsadat Saghi, Sadra Sabouri, Souti Chattopadhyay
Supporting Viewpoint Coordination for Compliance by Design with an Artifact Model for Regulatory Requirements Engineering
Oleksandr Kosenkov, Davide Fucci, Michael Unterkalmsteiner et al.
DistDebug-Bench: Can LLM Agents Diagnose Bugs in Distributed Systems?
Yuxuan Jiang, Chenglin Liu, John Rose et al.
uTECH Turbo-MOVES: The Intersection of Software Architectural Innovation and Sustainable Mobility Analysis
Cafer Avcı, Alireza Yazdiani, Roopak Srinivasan et al.
Specification-Driven Governance for Fairness-by-Design in Agentic Software Engineering: How Far Can We Go?
Alfonso Cannavale, Alessandra Parziale, Valeria Pontillo et al.
Can Coding Agents Sustain Continual Evolution without Forgetting?
Shangziqi Zhao, Yitong Zhang, Jia Li