{"paper":{"title":"Copy-as-Decode: Grammar-Constrained Parallel Prefill for LLM Editing","license":"http://creativecommons.org/licenses/by/4.0/","headline":"Copy-as-Decode recasts LLM editing as grammar-constrained decoding that copies input spans via single-step parallel prefill instead of full autoregressive regeneration.","cross_cats":["cs.AI"],"primary_cat":"cs.CL","authors_text":"Ziyang Liu","submitted_at":"2026-04-20T12:29:53Z","abstract_excerpt":"LLMs edit text and code by autoregressively regenerating the full output, even when most tokens appear verbatim in the input. We study Copy-as-Decode, a decoding-layer mechanism that recasts edit generation as structured decoding over a two-primitive grammar: <copy lines=\"i-j\"/> references an input line range, <gen>...</gen> emits new content. A token-level FSM guarantees syntactic validity, and a serving-layer primitive updates the KV cache for each copy span via a single parallel-prefill forward rather than $N$ autoregressive steps -- sharing the parallel-forward kernel of speculative decodi"},"claims":{"count":4,"items":[{"kind":"strongest_claim","text":"Composed with the empirical kernel over each corpus's span histogram this yields a closed-form wall-clock bound of 29.0× / 3.4× / 4.2× (13.0× pooled). A token-level extension reaches 91–99% coverage with 4.5×–6.5× floors. Oracle programs round-trip through the deterministic resolver on all 482 cases.","source":"verdict.strongest_claim","status":"machine_extracted","claim_id":"C1","attestation":"unclaimed"},{"kind":"weakest_assumption","text":"That accurate copy spans (line ranges or token ranges) can be selected at inference time; the mechanism itself is shown to be lossless under perfect spans, but the perturbation study demonstrates that off-by-one noise drops pooled EM from 100% to 15.48%.","source":"verdict.weakest_assumption","status":"machine_extracted","claim_id":"C2","attestation":"unclaimed"},{"kind":"one_line_summary","text":"Copy-as-Decode recasts LLM editing as grammar-constrained decoding over copy and generate primitives, delivering closed-form upper-bound speedups of 13x pooled on editing benchmarks via parallel prefill without any training.","source":"verdict.one_line_summary","status":"machine_extracted","claim_id":"C3","attestation":"unclaimed"},{"kind":"headline","text":"Copy-as-Decode recasts LLM editing as grammar-constrained decoding that copies input spans via single-step parallel prefill instead of full autoregressive regeneration.","source":"verdict.pith_extraction.headline","status":"machine_extracted","claim_id":"C4","attestation":"unclaimed"}],"snapshot_sha256":"73aa632e692e94de4f206ab5879156f2ad6a9bc36d86ac04c139bd8719379209"},"source":{"id":"2604.18170","kind":"arxiv","version":2},"verdict":{"id":"fa474098-3e7f-4046-ba9c-550153645f5a","model_set":{"reader":"grok-4.3"},"created_at":"2026-05-10T04:39:45.471296Z","strongest_claim":"Composed with the empirical kernel over each corpus's span histogram this yields a closed-form wall-clock bound of 29.0× / 3.4× / 4.2× (13.0× pooled). A token-level extension reaches 91–99% coverage with 4.5×–6.5× floors. Oracle programs round-trip through the deterministic resolver on all 482 cases.","one_line_summary":"Copy-as-Decode recasts LLM editing as grammar-constrained decoding over copy and generate primitives, delivering closed-form upper-bound speedups of 13x pooled on editing benchmarks via parallel prefill without any training.","pipeline_version":"pith-pipeline@v0.9.0","weakest_assumption":"That accurate copy spans (line ranges or token ranges) can be selected at inference time; the mechanism itself is shown to be lossless under perfect spans, but the perturbation study demonstrates that off-by-one noise drops pooled EM from 100% to 15.48%.","pith_extraction_headline":"Copy-as-Decode recasts LLM editing as grammar-constrained decoding that copies input spans via single-step parallel prefill instead of full autoregressive regeneration."},"integrity":{"clean":true,"summary":{"advisory":0,"critical":0,"by_detector":{},"informational":0},"endpoint":"/pith/2604.18170/integrity.json","findings":[],"available":true,"detectors_run":[{"name":"doi_compliance","ran_at":"2026-05-20T04:23:33.036863Z","status":"completed","version":"1.0.0","findings_count":0}],"snapshot_sha256":"3cb60e181265e535f4938e09e63f59a14ae664f672bd51866968784e56ee9621"},"references":{"count":0,"sample":[],"resolved_work":0,"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57","internal_anchors":0},"formal_canon":{"evidence_count":0,"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57"},"author_claims":{"count":0,"strong_count":0,"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57"},"builder_version":"pith-number-builder-2026-05-17-v1"}