paper-with-me

Papers

Think Anywhere in Code Generation

2026-03-31 · Xue Jiang, Tianyu Zhang, Ge Li, Mengyang Liu, Taozhi Chen, Zhenhua Xu, Binhua Li, Wenpin Jiao, Zhi Jin, Yongbin Li, Yihong Dong arxiv

Recent advances in reasoning Large Language Models (LLMs) have primarily relied on upfront thinking, where reasoning occurs before final answer. However, this approach suffers from critical limitations in code generation, where upfront thinking is often insufficient as problems' full complexity only reveals itself during code implementation. Moreover, it cannot adaptively allocate reasoning effort throughout the code generation process where difficulty varies significantly. In this paper, we propose Think-Anywhere, a novel reasoning mechanism that enables LLMs to invoke thinking on-demand at any token position during code generation. We achieve Think-Anywhere by first teaching LLMs to imitate the reasoning patterns through cold-start training, then leveraging outcome-based RL rewards to drive the model's autonomous exploration of when and where to invoke reasoning. Extensive experiments on four mainstream code generation benchmarks (i.e., LeetCode, LiveCodeBench, HumanEval, and MBPP) show that Think-Anywhere achieves state-of-the-art performance over both existing reasoning methods and recent post-training approaches, while demonstrating consistent generalization across diverse LLMs. Our analysis further reveals that Think-Anywhere enables the model to adaptively invoke reasoning at high-entropy positions, providing enhanced interpretability.

📄 PDF Abstract BibTeX arXiv:2603.29957

Code (0)

등록된 구현이 없습니다.

Tasks

Code Generation

Similar Papers 제목 키워드 기반

ChangeAnywhere: Sample Generation for Remote Sensing Change Detection via Semantic Latent Diffusion Model

2024-04-13 · Kai Tang, Jin Chen

Remote sensing change detection (CD) is a pivotal technique that pinpoints changes on a global scale based on multi-temporal images. With the recent expansion of deep learning, supervised deep learning-based CD models ha…

Change DetectionDeep Learning

ActAnywhere: Subject-Aware Video Background Generation

2024-01-19 · Boxiao Pan, Zhan Xu, Chun-Hao Paul Huang, Krishna Kumar Singh 외

Generating video background that tailors to foreground subject motion is an important problem for the movie industry and visual effects community. This task involves synthesizing background that aligns with the motion an…

StableIdentity: Inserting Anybody into Anywhere at First Sight

2024-01-29 · Qinghe Wang, Xu Jia, Xiaomin Li, Taiqing Li 외

Recent advances in large pretrained text-to-image models have shown unprecedented capabilities for high-quality human-centric generation, however, customizing face identity is still an intractable problem. Existing metho…

3D Generation

DreamAnywhere: Object-Centric Panoramic 3D Scene Generation

2025-06-25 · Edoardo Alberto Dominici, Jozef Hladky, Floor Verhoeven, Lukas Radl 외

Recent advances in text-to-3D scene generation have demonstrated significant potential to transform content creation across multiple industries. Although the research community has made impressive progress in addressing …

Novel View SynthesisObjectScene GenerationScene Understanding+1

Anywhere: A Multi-Agent Framework for User-Guided, Reliable, and Diverse Foreground-Conditioned Image Generation

2024-04-29 · Tianyidan Xie, Rui Ma, Qian Wang, Xiaoqian Ye 외

Recent advancements in image-conditioned image generation have demonstrated substantial progress. However, foreground-conditioned image generation remains underexplored, encountering challenges such as compromised object…

DiversityImage GenerationImage InpaintingLanguage Modeling+2