Skip to main content
QUICK REVIEW

[논문 리뷰] Lookahead-then-Verify: Reliable Constrained Decoding for Diffusion LLMs under Context-Free Grammars

Yitong Zhang, Yongmin Li|arXiv (Cornell University)|2026. 01. 31.
Natural Language Processing TechniquesComputer Science인용 수 0
한 줄 요약

LAVE는 CFG 제약을 확인하기 위해 병렬 토큰 예측에 대한 선행 탐색을 사용하는 확산 LLMs의 제약된 디코딩 방식으로, 여러 모델과 벤치마크에서 런타임 비용은 미미하고 거의 100%의 구문 정확성을 달성합니다.

ABSTRACT

Diffusion Large Language Models (dLLMs) have demonstrated promising generative capabilities and are increasingly used to produce formal languages defined by context-free grammars, such as source code and chemical expressions. However, as probabilistic models, they still struggle to generate syntactically valid outputs reliably. A natural and promising direction to address this issue is to adapt constrained decoding techniques to enforce grammatical correctness during generation. However, applying these techniques faces two primary obstacles. On the one hand, the non-autoregressive nature of dLLMs renders most existing constrained decoding approaches inapplicable. On the other hand, current approaches specifically designed for dLLMs may allow intermediate outputs that are impossible to complete into valid sentences, which significantly limits their reliability in practice. To address these challenges, we present LAVE, a constrained decoding approach specifically designed for dLLMs. Our approach leverages a key property of dLLMs, namely their ability to predict token distributions for all positions in parallel during each forward pass. Whenever a new token is proposed by model, LAVE performs lookahead using these distributions to efficiently and reliably verify the validity of the proposed token. This design ensures reliable constraints by reliably preserving the potential for intermediate outputs to be extended into valid sentences. Extensive experiments across four widely used dLLMs and three representative benchmarks demonstrate that LAVE consistently outperforms existing baselines and achieves substantial improvements in syntactic correctness, while incurring negligible runtime overhead.

연구 동기 및 목표

  • 확산 LLMs(dLLMs)에서 CFG 제약 디코딩의 신뢰성 격차를 식별합니다.
  • dLLMs의 비자기회생적 생성에 맞춘 제약된 디코딩 방법을 개발합니다.
  • 중간 출력이 CFG에 따라 유효한 문장으로 확장될 수 있도록 유지합니다.
  • 제안된 방법이 다양한 문법에서 구문적 및 기능적 정확도를 개선함을 입증합니다.
  • 다양한 모델과 벤치마크에서 접근 방식의 런타임 오버헤드와 강건성을 평가합니다.

제안 방법

  • dLLMs의 병렬 토큰 예측을 활용하여 현재 불완전한 출력에 대한 전체 접두사를 샘플링함으로써 선행 탐색을 수행합니다.
  • 문법 파서를 사용하여 어떤 선행 샘플 완성 접두사든 유효한 문장으로 확장될 수 있는지(IsExtendable) 확인합니다.
  • 적어도 하나의 샘플링된 완성 접두사가 확장 가능하면 제안된 토큰을 수락하고, 그렇지 않으면 거부 후 재샘플링합니다.
  • 디코딩 중 막히는 경우를 안내하기 위해 검증된 접두사의 캐시(y_cache)를 유지합니다.
  • 현재 컨텍스트를 검증 가능한 접두사로 대체하고 필요한 경우 다음 토큰 분포를 허용 가능한 토큰으로 제한하는 경량 캐시 기반 복구를 도입합니다.
  • lookahead 크기 N과 시도 예산 τ를 매개변수로 제공하고 CFG 유효성 검사를 위해 Earley 파서를 사용합니다.

실험 결과

연구 질문

  • RQ1RQ1: LAVE가 Baselines에 비해 dLLM 출력의 구문 적합성을 얼마나 잘 보장합니까?
  • RQ2RQ2: LAVE가 dLLM 출력의 기능적 정확성을 얼마나 개선합니까?
  • RQ3RQ3: LAVE가 도입하는 런타임 오버헤드는 어느 정도입니까?
  • RQ4RQ4: LAVE의 각 구성요소가 전체 성능에 얼마나 기여합니까?
  • RQ5RQ5: 하이퍼파라미터가 LAVE 성능에 어떤 영향을 줍니까?

주요 결과

  • LAVE는 네 가지 dLLM과 세 가지 CFG 기반 벤치마크에서 구문적 정확도 면에서 지속적으로 Baselines를 능가합니다.
  • 다양한 설정에서 구문적 정확도가 거의 100%에 가까워지며, 기존의 제약된 디코딩 방법에 비해 상당한 이득을 제공합니다.
  • 다수의 시나리오에서 기능적 정확도도 향상되며, 대안 접근 방식의 이득을 종종 초과합니다.
  • LAVE의 런타임 오버헤드는 무시 가능한 것으로 보고됩니다.
  • 변수별 분석(Ablation studies)에서 각 구성요소가 성능에 긍정적으로 기여하고 LAVE가 하이퍼파라미터 변동에 강건함을 보임을 확인합니다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.