首页 > AI前沿 > When Do Repetition Loops Lock? Truncation Sampling, Bounded Penalties, and a Blind Spot in DRY

When Do Repetition Loops Lock? Truncation Sampling, Bounded Penalties, and a Blind Spot in DRY

arXiv自然语言 2026-10-17 22:25 3 阅读 查看原文
1. Analyze the Request: * Role: Professional news layout engineer. * Task: Convert plain text news article into an "semanticized HTML fragment". * Rules: 1. Output *only* the HTML fragment, no Markdown fences, no explanations. 2. Paragraphs use `

`, long articles use `

`/`

` for sections. 3. Lists use `
  • `, quotes use `
    `, code uses `
    `, important sentences use ``.
            4. Preserve *all* original information (no additions or deletions).
            5. No document-level tags (``, ``, ``).
    
    2.  Analyze the Source Text:
        *   *Paragraph 1:* "Language models sometimes repeat verbatim until the generation limit. We study the exit rather than the entrance: given that a span has already been repeated $n$ times, when is escape still possible? Along the loop the context is deterministic, so loop survival under any sampler can be computed exactly from one forward pass."
        *   *Paragraph 2:* "Pure sampling leaves a positive escape probability at every step; top-$p$ with threshold $π>1/2$ locks a position exactly when the continuation probability reaches $π$. A bounded penalty can leave a position locked; a penalty that outgrows the model's preference for the loop over unseen tokens guarantees escape under top-$p$."
        *   *Paragraph 3:* "The same analysis predicts a blind spot in the widely deployed DRY sampler: its sequence breakers cap the penalty at $λb^{g-1-a}$ for loops whose longest breaker-free run has $g$ tokens. On eleven open models, 66\% of locked units with $g=6$ stay locked under DRY and 1\% with $g=8$. In free generation with llama.cpp, all 109 loops that survive DRY have $g\le 7$."
        *   *Paragraph 4:* "We propose DRY-C, which adds a term that grows exponentially with the number of verbatim recurrences, up to its look-back window. With it, none of 720 structured output generations looped to the length limit, and task completion stayed close to DRY's."
    
    3.  Determine Structure and Tags:
        *   The text is a single research paper abstract/summary. It naturally breaks down into logical sections based on the flow of ideas.
        *   Section 1: Core problem & determinism (Paras 1 & 2). Let's group them or use `

    ` for the main topic and `

    ` for the paragraphs. Since it's a short article, maybe just `

    ` for the first part and `

    ` for the specific method analysis, then `

    ` for the results? Or just standard paragraphs with `` for key sentences as requested. The prompt says "长文用

    /

    划分小节" (long articles use h2/h3 to divide sections). This text is relatively short but dense. I will structure it logically: * `

    ` "核心问题与确定性分析" (Core Problem and Deterministic Analysis) -> Para 1 & 2 * `

    ` "DRY采样的盲点" (Blind spot in DRY sampler) -> Para 3 * `

    ` "DRY-C的提出与验证" (Proposal and Verification of DRY-C) -> Para 4 * Wait, the rule says "每个自然段落用

    包裹" (every natural paragraph wrapped in `

    `). If I use `

    `, do I also wrap the following text in `

    `? Usually, yes, or the heading stands alone. Let's make headings stand alone and wrap paragraphs in `

    `. * Let's refine the structure: * `

    ` Loop escape conditions * `

    Language models sometimes repeat verbatim until the generation limit. We study the exit rather than the entrance: given that a span has already been repeated $n$ times, when is escape still possible? Along the loop the context is deterministic, so loop survival under any sampler can be computed exactly from one forward pass.

    ` * `

    Pure sampling leaves a positive escape probability at every step; top-$p$ with threshold $π>1/2$ locks a position exactly when the continuation probability reaches $π$. A bounded penalty can leave a position locked; a penalty that outgrows the model's preference for the loop over unseen tokens guarantees escape under top-$p$.` (Wait, this is one sentence? No, it's two independent clauses separated by a semone. Let's keep it as one `

    `.) * `

    ` Blind spot in DRY sampler * `

    The same analysis predicts a blind spot in the widely deployed DRY sampler: its sequence breakers cap the penalty at $λb^{g-1-a}$ for loops whose longest breaker-free run has $g$ tokens. On eleven open models, 66% of locked units with $g=6$ stay locked under DRY and 1% with $g=8$. In free generation with llama.cpp, all 109 loops that survive DRY have $g\le 7$.

    ` * `

    ` DRY-C proposal and validation * `

    We propose DRY-C, which adds a term that grows exponentially with the number of verbatim recurrences, up to its look-back window. With it, none of 720 structured output generations looped to the length limit, and task completion stayed close to DRY's.

    ` * Where do I use `
    • `, `
      `, `
      `, ``?
              *   The prompt requires using these tags if applicable ("列表内容用
      • ,引用用
        ,代码用
        ,重要句子可用"). While the source text doesn't explicitly have lists or blockquotes, a good semanticizer might extract key facts or emphasize important sentences.
                *   Important sentences:
                    *   "Pure sampling leaves a positive escape probability at every step; top-$p$ with threshold $π>1/2$ locks a position exactly when the continuation probability reaches $π$." -> Make this ``?
                    *   "A bounded penalty can leave a position locked; a penalty that outgrows the model's preference for the loop over unseen tokens guarantees escape under top-$p$." -> Make this ``?
                    *   "On eleven open models, 66% of locked units with $g=6$ stay locked under DRY and 1% with $g=8$." -> Important stats, maybe ``?
                    *   "none of 720 structured output generations looped to the length limit" -> Important result, maybe ``? * Can I create a list from the key points? "核心发现:..." No, the rule says "保留原文所有信息,不得增删改内容" (Preserve all original info, don't add/delete). Creating bullet points might violate "natural paragraph" rules or imply adding structure not explicitly in the text. Better to just use `` for the most critical sentences within the ` 
                                   

        ` tags. * What about `\$`? The prompt has `$n$`, `$π$`, `$π>1/2$`, `$π$`, `$λb^{g-1-a}$`, `$g=6$`, `$g=8$`, `$g\le 7$`. I must keep these exact LaTeX strings. 4. Drafting the HTML: ```html

        Loop Escape Conditions

        Language models sometimes repeat verbatim until the generation limit. We study the exit rather than the entrance: given that a span has already been repeated $n$ times, when is escape still possible? Along the loop the context is deterministic, so loop survival under any sampler can be computed exactly from one forward pass.

        Pure sampling leaves a positive escape probability at every step; top-$p$ with threshold $π>1/2$ locks a position exactly when the continuation probability reaches $π$. A bounded penalty can leave a position locked; a penalty that outgrows the model's preference for the loop over unseen tokens guarantees escape under top-$p$.

        Blind Spot in DRY Sampler

        The same analysis predicts a blind spot in the widely deployed DRY sampler: its sequence breakers cap the penalty at $λb^{g-1-a}$ for loops whose longest breaker-free run has $g$ tokens. On eleven open models, 66% of locked units with $g=6$ stay locked under DRY