Newest papers

When Copying Is Hard: Copy-Constrained Decoding for Exact Span Reproduction

Jinghui Zhang, Lang Gao, Zongfang Liu, Ruihong Zeng, Zirui Song, Rui Yan, Kentaro Inui, Xiuying Chen · 2026 · arXiv (Cornell University)

DOI: 10.48550/arxiv.2610.28393 · cited by 0 works (OpenAlex) · open-access PDF

Vietnamese

Chính xác là Coptain Copy được tái tạo miễn phí trong một bối cảnh dài là một bài kiểm tra khả năng cơ bản cho LLMs: ngay cả khi chuỗi mục tiêu hiện diện trong bối cảnh, các mô hình thường vẫn di chuyển chính xác trong phạm vi hoặc không dừng lại một cách chính xác, tiết lộ những hạn chế trong nền tảng nguồn và kiểm soát ranh giới. Khả năng này vẫn có tầm quan trọng thực tế rộng rãi. Ví dụ, việc tạo mã thường đòi hỏi phải nhúng các chuỗi nhạy cảm như phím API chính xác như chúng xuất hiện trong bối cảnh. Trong công việc này, chúng tôi xây dựng một tiêu chuẩn để kiểm tra khả năng tái tạo chính xác trong các hợp đồng, văn học khoa học, mã và chuỗi ngẫu nhiên, và thấy rằng các mô hình hiện tại vẫn làm cho những sai sót thường xuyên đáng ngạc nhiên. Để giải quyết

Machine translation (Meta M2M100); the English original follows.

Abstract

Precisely reproducing a target span verbatim within a long context is a fundamental capability test for LLMs: even when the target string is present in context, models often still drift within the span or fail to stop correctly, revealing limitations in source grounding and boundary control. This capability has broad practical relevance. For instance, code generation often requires embedding sensitive strings such as API keys exactly as they appear in context. In this work, we construct a benchmark to test exact span reproduction ability across contracts, scientific literature, code, and random sequences, and find that current models still make surprisingly frequent errors. To address this, we propose CopyGen, a lightweight copy-constrained plugin for frozen LLMs that turns copying from a byproduct of next-token prediction into a controlled process. Our key idea is to decompose copying into three distinct decisions: when to copy, how far to copy, and when to stop. Concretely, CopyGen first determines whether to enter copy mode, then predicts a tentative copy length, and finally verifies the generated span token by token. During verification, we adaptively adjust the logits of copy continuation tokens to incentivize or suppress continuation, and emit only the longest valid prefix. Across three LLM backbones and four benchmark tasks, CopyGen improves average exact match by 35% relative without model finetuning, and integrates seamlessly with SFT to further improve it by 4%, while substantially accelerating generation. These results suggest that reliable exact copying is not something LLMs obtain for free, but a decoding-time control problem that requires explicit modeling. Code is available at https://github.com/mbzuai-nlp/CopyGen.

Read in: English · Spanish · Chinese · Hindi · Arabic · Portuguese · French · German · Japanese · Russian · Korean · Indonesian · Vietnamese

Topics: Copying, Computer science, Benchmark (surveying), Context (archaeology), Decoding methods, String (physics)

Is this paper real? This page was built from OpenAlex and arXiv records, not generated. Software can verify any reference in one call: GET https://store.agentexchange.work/gw/papers/verify?title=...&year=... (0.003 USD), fetch this record as JSON with /gw/papers/paper?id=2610.28393, or list what it cites with /gw/papers/references?id=.... Pay per call in USDC (x402) or with a 19 USD card key for 1,000 calls. Catalogue · llms.txt

Sources: OpenAlex (CC0), arXiv, Crossref. Agent Exchange