Skip to content

AlphaLab-USTC/LRM-plans-CoT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

On Reasoning Strength Planning in Large Reasoning Models

license
Leheng Sheng1, An Zhang2†, Zijian Wu1, Weixiang Zhao3, Changshuo Shen2, Yi Zhang2, Xiang Wang2, Tat-Seng Chua1,
1National University of Singapore, 2University of Science and Technology of China, 3Harbin Institute of Technology
+ Corresponding author.

License Python 3.11+

LRMs plan reasoning strengths with pre-allocated direction vectors

illustration

In our paper, we reveal that:

  • LRMs plan reasoning strengths in advance, even before the generation of the first reasoning token.
  • As the difficulty of questions increases, the reasoning strength of LRMs also increases. Meanwhile, the activations of different difficulty levels shift towards the same direction, with the magnitude of this direction controlling the reasoning strength.
  • Steering with the pre-allocated direction vectors can change the reasoning strength of LRMs, which further impacts the final performance.

Usage

Generate the main results (i.e., linear regression, direction vector extraction and analysis) in this paper:

bash scripts/analyze.sh

Evaluate the effect of steering:

python AnalyzeSteerFull.py

Replicate the results of the overthink detection before generation:

python eval_overthink.py

Replicate the results of the efficient inference:

python efficient_reasoning.py

Activation Steering with vLLM

We implement the activation steering with vLLM, which can be found in steer_qwen2_vllm.py file. To enable the usage of vLLM, you need to set the environment variable steering_vector_path to the path of the steering vector.

export steering_vector_path=/path/to/steering_vector.npy

☎️ Contact

Please contact the first author for any questions.

🌟 Citation

If you find our work useful, please kindly consider citing our work as follows:

@article{sheng2025reasoning,
  title={On Reasoning Strength Planning in Large Reasoning Models},
  author={Sheng, Leheng and Zhang, An and Wu, Zijian and Zhao, Weixiang and Shen, Changshuo and Zhang, Yi and Wang, Xiang and Chua, Tat-Seng},
  journal={arXiv preprint arXiv:2506.08390},
  year={2025}
}

About

[NeurIPS 2025] The implementation of paper "On Reasoning Strength Planning in Large Reasoning Models"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •