paper-with-me

Papers

Weave of Formal Thought

2026-06-24 · Alexandre Bouayad arxiv

Large language models (LLMs) attain remarkable surface fluency on code, yet they neither formally guarantee the syntactic validity of their output nor leverage the hierarchical structure defining the target language. While existing constrained-decoding frameworks address the former, they operate under rigid assumptions that preclude critical lexical mechanisms -- including context-sensitive lexing, maximal-munch tokenization, and keyword extraction -- and only approximate vocabulary masking, sacrificing completeness. For the latter, code LLMs typically inject grammatical structure via predetermined policies rather than learning which structural information to expose. In this work, we introduce Weave of Formal Thought (WoFT), a paradigm uniting rigorous syntactic validation with learned structural representations. First, we present a formal engine and constrained decoder that is sound and complete with respect to the full Tree-sitter specification. By augmenting generalized LR (GLR) parsing with a speculative-lexing construction that maintains concurrent lexer-state hypotheses synchronized with a GLR graph-structured stack, our decoder admits every subword token extending to a valid program prefix and rejects all others. Second, we present a latent-variable fine-tuning method training the language model to interleave non-terminal grammar symbols directly into generation. Utilizing the reweighted wake-sleep (RWS) algorithm to optimize the importance-weighted evidence lower bound (IW-ELBO) of the surface text, the model learns to selectively retain formal derivations as an adaptive structural scratchpad. For Python, fine-tuning StarCoder2-3B with our RWS objective reduces per-token cross-entropy by 14.3% relative to a text-only SFT baseline, demonstrating that discretionary latent syntax recovers critical structural information that flat autoregressive training discards.

📄 PDF Abstract BibTeX arXiv:2606.25987

Code (0)

등록된 구현이 없습니다.

Tasks

Keyword Extraction

Similar Papers 제목 키워드 기반

DeepWeaver: Bridging the Evidence Synthesis Gap in Open-Ended Question Answering

2026-08-19 · Xujia Wang, Yizhe Zhang, Bin Xu, Lei Hou 외 arxiv

Retrieve-then-generate pipelines are commonly used to produce deep-research answers for open-ended questions, but retrieval alone is insufficient: LLMs must organize noisy and fragmented evidence into comprehensive, well…

Question Answering

Weaver: End-to-End Agentic System Training for Video Interleaved Reasoning

2026-02-05 · Yudi Shi, Shangzhe Di, Qirui Chen, Qinian Wang 외 arxiv

Video reasoning constitutes a comprehensive assessment of a model's capabilities, as it demands robust perceptual and interpretive skills, thereby serving as a means to explore the boundaries of model performance. While …

Reinforcement LearningMultimodal Reasoning

ThreadWeaver: Adaptive Threading for Efficient Parallel Reasoning in Language Models

2025-11-24 · Long Lian, Sida Wang, Felix Juefei-Xu, Tsu-Jui Fu 외 arxiv

Scaling inference-time computation has enabled Large Language Models (LLMs) to achieve strong reasoning performance, but their inherently sequential decoding incurs substantial latency, motivating parallelization of the …

Reinforcement Learning

FutureWeaver: Planning Test-Time Compute for Multi-Agent Systems with Modularized Collaboration

2025-12-12 · Dongwon Jung, Peng Shi, Muhao Chen, Yi Zhang arxiv

Scaling test-time computation has been shown to significantly improve large language model (LLM) performance without additional training. However, extending these techniques to multi-agent systems remains challenging: ex…

SimWeaver: Zero-Shot RGB Sim-to-Real for Deformable Manipulation

2026-06-13 · Wenkang Hu, Haoran Wang, Yitong Li, Liu Liu 외 arxiv

RGB sim-to-real for deformable manipulation has remained largely unsolved without real-world fine-tuning. We present SimWeaver, which trains zero-shot RGB VLA policies on 200 simulated demonstrations per task, reaching a…

Image Generation