While a lot of recent research focuses on enhancing the textual reasoning capabilities of Large Language Models (LLMs) by optimizing the multi-agent framework or reasoning chains, several benchmark tasks can be solved with 100\% success through direct coding, which is more scalable and avoids the computational overhead associated with textual iterating and searching. Textual reasoning has inherent limitations in solving tasks with challenges in math, logics, optimization, and searching, which is unlikely to be solved by simply scaling up the model and data size. The recently released OpenAI GPT Code Interpreter and multi-agent frameworks such as AutoGen have demonstrated remarkable proficiency of integrating code generation and execution to solve complex tasks using LLMs. However, based on our experiments on 7 existing popular methods for steering code/text generation in both single- and multi-turn settings with 14 tasks and 6 types of LLMs (including the new O1-preview), currently there is no optimal method to correctly steer LLMs to write code when needed. We discover some interesting patterns on when models use code vs. textual reasoning with the evolution to task complexity and model sizes, which even result in an astonishingly inverse scaling behavior. We also discover that results from LLM written code are not always better than using textual reasoning, even if the task could be solved through code. To mitigate the above issues, we propose three methods to better steer LLM code/text generation and achieve a notable improvement. The costs of token lengths and runtime are thoroughly discussed for all the methods. We believe the problem of steering LLM code/text generation is critical for future research and has much space for further improvement. Project Page, Datasets, and Codes are available at https://yongchao98.github.io/CodeSteer/.
LLaVA Steering: Visual Instruction Tuning with 500x Fewer Parameters through Modality Linear Representation-Steering
Ludwig Maximilian University of Munich(慕尼黑大学);Munich Research Center, Huawei Technologies(华为技术有限公司慕尼黑研发中心);Munich Center for Machine Learning(慕尼黑机器学习中心)
CodeRL+: Improving Code Generation via Reinforcement with Execution Semantics Alignment
School of Computer Science, Peking University(北京大学计算机科学系);Tongyi Lab, Alibaba Group(阿里集团通义实验室);School of Computer Science, Wuhan University(武汉大学计算机科学系)
Causal Effect Estimation with Latent Textual Treatments
School of Computer Science and Engineering, The Hebrew University of Jerusalem(计算机科学与工程学院,特拉维夫大学);Department of Economics, Stanford University(斯坦福大学经济系);Graduate School of Business, Stanford University(斯坦福大学商学院)
TextualRL: Textual Reinforcement Learning for Context Management
School of Computer Science and Technology, East China Normal University(华东师范大学计算机科学与技术学院);Shanghai Innovation Institute(上海创新研究院);Fudan University(复旦大学)
Automating Steering for Safe Multimodal Large Language Models
Zhejiang University(浙江大学);Zhejiang University - Ant Group Joint Lab of Knowledge Graph(浙江大学-蚂蚁集团知识图谱联合实验室);National University of Singapore, NUS-NCS Joint Lab(新加坡国立大学NUS-NCS联合实验室)
From Uncertainty to Action: Learning to Steer LLM Agents
New Jersey Institute of Technology(新泽西理工学院);University of North Carolina at Chapel Hill(北卡罗来纳大学教堂山分校);University of California, Irvine(加州大学尔湾分校);City University of Hong Kong(香港城市大学)
Integrating Time Series into LLMs via Multi-layer Steerable Embedding Fusion for Enhanced Forecasting
School of Software Engineering Sun Yat-Sen University(软件工程学院中山大学);Institute of Data Science(数据科学研究院);School of Computing(计算机学院);National University of Singapore(新加坡国立大学)
Code-MUE: Measuring Code LLMs' Uncertainty through Execution-based Semantic Interaction Graphs
Xi’an Jiaotong University(西安交通大学);Institute of AI for Industries, Chinese Academy of Sciences(中国科学院人工智能产业研究院);The University of Tokyo(东京大学);University of Alberta(阿尔伯塔大学)
Where Steering Signals Come From: Activation Source Selection in Activation Steering
Peking University(北京大学);Tsinghua University(清华大学);Beijing Academy of Artificial Intelligence(北京智源人工智能研究院);Tsinghua Shenzhen International Graduate School(清华大学深圳国际研究生院);YiXin-AILab(易信人工智能实验室)
EMO: A Closed-Loop Test-Time Computation Framework via Alternating Context Optimization and Logits Steering
State Key Laboratory of General Artificial Intelligence, School of Intelligence Science and Technology, Peking University(北京大学智能科学技术学院通用人工智能国家重点实验室);Samsung Research, Beijing, China(三星研究(北京))