{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2604-15750","title":"DepCap: Adaptive Block-Wise Parallel Decoding for Efficient Diffusion LM Inference","arxiv_id":"2604.15750","date":"2026-04-17","proceeding":null,"authors":["Xiang Xia","Wuyang Zhang","Jiazheng Liu","Cheng Yan","Yanyong Zhang"],"abstract":"Diffusion language models (DLMs) have emerged as a promising alternative to autoregressive language generation due to their potential for parallel decoding and global refinement of the entire sequence. To unlock this potential, DLM inference must carefully balance generation quality and decoding speed. Recent block-wise DLM decoding methods improve this trade-off by performing diffusion-based decoding sequentially in blocks. However, existing methods typically rely on fixed block schedules or current-step local signals to determine block boundaries, and use conservative confidence-based parallel decoding to avoid conflicts, limiting the quality-speed trade-off. In this paper, we argue that block-wise DLM inference requires more suitable signals for its two core decisions: cross-step signals for determining block boundaries, and token-level conflict signals for parallel decoding. Based on this view, we propose DepCap, a training-free framework for efficient block-wise DLM inference. Specifically, DepCap instantiates the cross-step signal as the influence of the last decoded block and uses it to adaptively determine how far the next block should extend, while identifying a conflict-free subset of tokens for safe parallel decoding within each block, enabling substantial inference acceleration with negligible quality degradation. DepCap is a plug-and-play method applicable to various DLMs, and compatible with existing KV-cache strategies for block-wise DLM. An information-theoretic analysis further suggests that the cumulative last-block influence on a candidate block is approximately additive across tokens, supporting the proposed block-partitioning criterion. Experimental results show that DepCap achieves favorable speed-quality trade-offs across multiple DLM backbones and reasoning and coding benchmarks, with up to 5.63$\\times$ speedup without significant performance degradation.","url_abs":"https://arxiv.org/abs/2604.15750","url_pdf":"https://arxiv.org/pdf/2604.15750","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2604.15750","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2604.15750"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/X-Xia0828/DepCap","reach":null}],"summary":{"ran_fixture":2,"ran":2,"ran_draft_wrong":4,"unverified":5},"by_repo_kind":{"found_in_text":{"samples":13,"ran":8,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":13,"samples":[{"code_sha256_prefix":"30d7eec482ebf6b1","entry":"repeat_kv","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"dream/model/modeling_dream.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/dream/model/modeling_dream.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"30d7eec482ebf6b1"}},{"code_sha256_prefix":"f9abf6d74699cc1c","entry":"causal_attention_bias","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"llada/model/modeling_llada.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/llada/model/modeling_llada.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f9abf6d74699cc1c"}},{"code_sha256_prefix":"c083e60f5001bd38","entry":"get_pairs","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"dream/model/tokenization_dream.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/dream/model/tokenization_dream.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c083e60f5001bd38"}},{"code_sha256_prefix":"a1a9545f89348999","entry":"refine_text","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"dream/sanitize.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/dream/sanitize.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a1a9545f89348999"}},{"code_sha256_prefix":"b99eea6376d1e212","entry":"rotate_half","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"dream/model/modeling_dream.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/dream/model/modeling_dream.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b99eea6376d1e212"}},{"code_sha256_prefix":"1891fed3a1008763","entry":"sample_tokens","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"dream/model/generation_utils.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/dream/model/generation_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1891fed3a1008763"}},{"code_sha256_prefix":"d78ba22cffe4710b","entry":"top_k_logits","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"dream/model/generation_utils.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/dream/model/generation_utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d78ba22cffe4710b"}},{"code_sha256_prefix":"8139ba2bcf3eb84b","entry":"top_p_logits","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"dream/model/generation_utils.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/dream/model/generation_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8139ba2bcf3eb84b"}},{"code_sha256_prefix":"ac6507e437413e71","entry":"apply_rotary_pos_emb","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"dream/model/modeling_dream.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/dream/model/modeling_dream.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ac6507e437413e71"}},{"code_sha256_prefix":"65b9fa737f2d65a7","entry":"extract_function_name","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"dream/postprocess_mbpp.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/dream/postprocess_mbpp.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"65b9fa737f2d65a7"}},{"code_sha256_prefix":"044f03d955ca1151","entry":"extract_longest_valid_code","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"dream/sanitize.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/dream/sanitize.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"044f03d955ca1151"}},{"code_sha256_prefix":"a1e20a66389a45ff","entry":"scaled_dot_product_attention","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"llada/model/modeling_llada.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/llada/model/modeling_llada.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a1e20a66389a45ff"}},{"code_sha256_prefix":"d7d30a99e0029e36","entry":"syntax_check","repo":"X-Xia0828/DepCap","repo_kind":"found_in_text","path":"dream/sanitize.py","file_url":"https://github.com/X-Xia0828/DepCap/blob/HEAD/dream/sanitize.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d7d30a99e0029e36"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}