Thinking Before Constraining: A Unified Decoding Framework for Large Language Models

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Nguyen, Ngoc Trinh Hung, Silva, Alonso, Zumot, Laith, Tupikina, Liubov, Aghasaryan, Armen, Alam, Mehwish
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866910269888790528
author Nguyen, Ngoc Trinh Hung
Silva, Alonso
Zumot, Laith
Tupikina, Liubov
Aghasaryan, Armen
Alam, Mehwish
author_facet Nguyen, Ngoc Trinh Hung
Silva, Alonso
Zumot, Laith
Tupikina, Liubov
Aghasaryan, Armen
Alam, Mehwish
contents Natural generation allows Large Language Models (LLMs) to produce free-form responses with rich reasoning, yet the lack of structure makes outputs difficult to verify. Conversely, constrained decoding ensures standardized formats but can inadvertently restrict reasoning capabilities by imposing constraints too early in the generation process. We propose a hybrid approach, namely In-Writing, that combines free-form reasoning and structured generation in a single call. The model first performs unconstrained reasoning and only applies structured decoding after a trigger token is generated, explicitly decoupling reasoning from formatting. We establish that our trigger-token strategies are able to virtually eradicate premature triggering, a failure mode in which constrained decoding interrupts on-going reasoning. Evaluations across diverse datasets covering classification and reasoning tasks demonstrate that our approach outperforms the state-of-the-art by achieving accuracy gains of up to 27% over natural generation. Our code are available at: https://github.com/Nokia-Bell-Labs/InWriting.
format Preprint
id arxiv_https___arxiv_org_abs_2601_07525
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Thinking Before Constraining: A Unified Decoding Framework for Large Language Models
Nguyen, Ngoc Trinh Hung
Silva, Alonso
Zumot, Laith
Tupikina, Liubov
Aghasaryan, Armen
Alam, Mehwish
Computation and Language
Artificial Intelligence
Natural generation allows Large Language Models (LLMs) to produce free-form responses with rich reasoning, yet the lack of structure makes outputs difficult to verify. Conversely, constrained decoding ensures standardized formats but can inadvertently restrict reasoning capabilities by imposing constraints too early in the generation process. We propose a hybrid approach, namely In-Writing, that combines free-form reasoning and structured generation in a single call. The model first performs unconstrained reasoning and only applies structured decoding after a trigger token is generated, explicitly decoupling reasoning from formatting. We establish that our trigger-token strategies are able to virtually eradicate premature triggering, a failure mode in which constrained decoding interrupts on-going reasoning. Evaluations across diverse datasets covering classification and reasoning tasks demonstrate that our approach outperforms the state-of-the-art by achieving accuracy gains of up to 27% over natural generation. Our code are available at: https://github.com/Nokia-Bell-Labs/InWriting.
title Thinking Before Constraining: A Unified Decoding Framework for Large Language Models
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2601.07525