RAIN-Merging: A Gradient-Free Method to Enhance Instruction Following in Large Reasoning Models with Preserved Thinking Format
Zhehao Huang (Shanghai Jiao Tong University), Yuhang Liu, Baijiong Lin, Yixin Lou, Zhengbao He, Hanling Tian, Tao Li, Xiaolin Huang
International Conference on Learning Representations 2026 · Oral
Overview
In an era increasingly defined by the capabilities of large language models (LLMs), the talk "RAIN-Merging: A Gradient-Free Method to Enhance Instruction Following in Large Reasoning Models with Preserved Thinking Format" presented a significant advancement in bridging a critical gap in LLM performance. Delivered by Zhehao Huang from Shanghai Jiao Tong University and collaborators, this research addresses the challenge of equipping powerful reasoning models with robust instruction-following abilities without incurring the high computational costs and potential performance regressions associated with traditional fine-tuning methods. The core innovation lies in RAIN-Merging, a novel two-stage, gradient-free approach that selectively merges instruction-tuned capabilities into reasoning models, crucially preserving their structured thinking processes and underlying reasoning prowess.

Key moments
- 0:00 Problem: Instruction following in large reasoning models
- 2:00 Key observations: Orthogonal task vectors, preserved thinking format
- 3:00 Stage 1: Reasoning-aware null-space projection for thinking format
- 4:40 Stage 2: Instruction-attention-guided merge coefficients
- 6:20 RAIN-Merging benefits: Instruction following, reasoning, gradient-free
- 8:00 Agentic scenarios and solving the reasoning-instruction coupling problem
- 9:20 Case study: Fixing the knowing-doing gap in reasoning
- 10:50 Conclusion: Low-cost method for instruction following and reasoning
RAIN-Merging: A Gradient-Free Method to Enhance Instruction Following in Large Reasoning Models with Preserved Thinking Format
Speakers: Zhehao Huang (Shanghai Jiao Tong University); Yuhang Liu; Baijiong Lin; Yixin Lou; Zhengbao He; Hanling Tian; Tao Li; Xiaolin Huang
Conference: ICLR 2026
YouTube: https://slideslive.com/39062224
Overview
In an era increasingly defined by the capabilities of large language models (LLMs), the talk "RAIN-Merging: A Gradient-Free Method to Enhance Instruction Following in Large Reasoning Models with Preserved Thinking Format" presented a significant advancement in bridging a critical gap in LLM performance. Delivered by Zhehao Huang from Shanghai Jiao Tong University and collaborators, this research addresses the challenge of equipping powerful reasoning models with robust instruction-following abilities without incurring the high computational costs and potential performance regressions associated with traditional fine-tuning methods. The core innovation lies in RAIN-Merging, a novel two-stage, gradient-free approach that selectively merges instruction-tuned capabilities into reasoning models, crucially preserving their structured thinking processes and underlying reasoning prowess.
The motivation behind RAIN-Merging stems from a common dichotomy observed in advanced LLMs: while many models excel at complex reasoning tasks like mathematics or software engineering, they often falter in adhering to precise instructions, particularly in dynamic, agentic environments. Existing solutions, such as continuous supervised fine-tuning (SFT) or reinforcement learning (RL), are notoriously expensive, resource-intensive, and can inadvertently degrade the model's original capabilities. RAIN-Merging offers a lightweight and efficient alternative, leveraging insights into the parameter space of different model abilities. By preventing disruption to the model's internal "thinking format"—the specialized tokens and structures it uses to articulate its reasoning—the method not only enhances instruction following but also surprisingly improves overall reasoning performance by reducing the "knowing-doing gap." This work holds substantial importance for the development and deployment of more reliable, adaptable, and cost-effective AI agents and interactive systems.
Background
▶ Watch: Problem: Instruction following in large reasoning models (0:00)
Large language models have made remarkable strides, demonstrating formidable capabilities across a spectrum of complex tasks. Specifically, large reasoning models have distinguished themselves in domains requiring logical deduction, problem-solving, and structured output, such as advanced mathematics, scientific inquiry, and intricate software engineering challenges. Their ability to generate coherent, multi-step thought processes, often articulated through specialized internal tokens like think, has been pivotal to their success. However, a significant limitation emerges when these models are deployed in interactive or agentic scenarios, where precise instruction following is paramount. Despite their reasoning prowess, these models frequently struggle to consistently adhere to user instructions, leading to suboptimal or incorrect final outputs even when their internal reasoning chain is sound.
Addressing this deficit traditionally involves computationally intensive methods like supervised fine-tuning (SFT) or reinforcement learning (RL). While effective, these approaches demand substantial computational resources (GPUs, TPUs), extensive datasets, and prolonged training times. Furthermore, a critical drawback is the potential for capability regression, where fine-tuning for one specific ability (e.g., instruction following) can inadvertently degrade other established capabilities (e.g., reasoning or general knowledge). This presents a significant hurdle for researchers and practitioners aiming to enhance model utility without compromising core strengths.
The authors observed that many large reasoning models often have corresponding instruction-tuned versions built upon the same base architecture. For instance, DeepSeek-R1-Distill-Qwen is derived from Qwen25-Instruct. This commonality led them to explore model merging as a more lightweight alternative. Model merging techniques, such as task arithmetic, operate on the principle of task vectors. A task vector is defined as the difference in parameters between a base model and its fine-tuned version for a specific task. Essentially, this vector encapsulates the incremental knowledge or skill learned during the fine-tuning process. The central hypothesis was whether an instruction-tuned model's capabilities could be merged into a reasoning model to enhance instruction following while preserving reasoning performance and, critically, the structured thinking output.
Two key observations underpinned the development of RAIN-Merging. First, the researchers found that the parameter subspace associated with a reasoning model's task vector and an instruction-tuned model's task vector are almost orthogonal across different layers and major models. This suggests a weak coupling between reasoning ability and instruction-following ability in the parameter space, indicating that merging these capabilities might be feasible without direct interference. Second, and crucially, directly applying standard task arithmetic to merge these models consistently led to a breakdown of the reasoning model's thinking format. Large reasoning models rely heavily on special tokens (e.g., <thought>, think, <step>) to delineate internal reasoning steps from the final response. Direct merging, the authors observed, interrupted the model's output distribution over these format tokens, resulting in unstable, non-compliant, and ultimately unusable outputs. These observations highlighted the need for a merging strategy that could selectively inject instruction-following capabilities while meticulously safeguarding the integrity of the reasoning model's structured thinking process.
Key Findings
▶ Watch: Stage 1: Reasoning-aware null-space projection for thinking format (3:00)
The RAIN-Merging method emerges as a highly effective and efficient solution to the pervasive challenge of enhancing instruction following in large reasoning models. The research yielded several pivotal findings that underscore its significance:
- Enhanced Instruction Following with Preservation: RAIN-Merging consistently and significantly outperforms existing merging baselines on a variety of instruction-following benchmarks. Crucially, this enhancement does not come at the cost of the model's original reasoning capabilities or general knowledge; in many cases, these capabilities were observed to improve.
- Gradient-Free and Computationally Efficient: The method is entirely gradient-free, eliminating the need for extensive backpropagation and iterative optimization. This translates into substantially lower computational costs compared to traditional supervised fine-tuning (SFT) or reinforcement learning (RL), making it highly accessible for scenarios with limited computational resources.
- Preservation of Structured Thinking Format: A core achievement of RAIN-Merging is its ability to maintain the reasoning model's structured thinking format. By projecting parameter updates into a null space that avoids interference with special thinking tokens, the method ensures that the model continues to produce stable, compliant, and internally consistent reasoning outputs.
- Scalability and Generalizability: The benefits of RAIN-Merging were demonstrated to be consistent and robust across different model sizes and diverse architectures, including both Qwen and Llama families. This indicates broad applicability and scalability of the approach.
- Improved Agentic Performance: In complex, real-world-like agentic scenarios, such as ALFWorld and WebShop, RAIN-Merging consistently improved the agentic comprehensiveness of the reasoning models, allowing them to better understand and execute multi-step instructions within dynamic environments.
- Resolution of the Coupling Problem and "Knowing-Doing Gap": The method successfully addresses the inherent difficulty models face in simultaneously performing complex reasoning and adhering to instructions. By fostering better alignment between internal reasoning and final responses, RAIN-Merging significantly boosts accuracy in tasks requiring both abilities. This effectively closes the "knowing-doing gap," where a model's internal reasoning might be correct, but its final output contradicts that reasoning.
- Unexpected Reasoning Improvement: A counter-intuitive but significant finding was that by improving the alignment between a model's internal chain of thought and its final decision, RAIN-Merging actually led to an improvement in reasoning and general benchmarks. This indicates that the "knowing-doing gap" was a previously underestimated bottleneck for overall model performance.
Technical Deep Dive
▶ Watch: RAIN-Merging benefits: Instruction following, reasoning, gradient-free (6:20)
RAIN-Merging is a meticulously designed two-stage methodology engineered to address the dual challenge of enhancing instruction following while preserving the reasoning model's structured thinking format. It leverages insights into the parameter space and attention mechanisms to achieve its gradient-free efficiency.
The method's foundation rests on the observation that the task vector representing reasoning ability is largely orthogonal to that representing instruction-following ability. However, a direct merge breaks the critical "thinking format" relied upon by reasoning models (e.g., using special tokens like think or <thought>). To circumvent this, RAIN-Merging employs a two-stage process:
Stage 1: Reasoning-Aware Null-Space Projection (RAIN-P)
The primary objective of the first stage, Reasoning-Aware Null-Space Projection (RAIN-P), is to meticulously preserve the original reasoning model's structured thinking format. The core intuition is that after merging, the model's behavior concerning special thinking tokens should remain virtually identical to that of the original model. This means the output distribution over these thinking format tokens must stay almost unchanged.
To achieve this, the authors construct a null-space projection operator. This operator is derived from the input features associated with the special thinking format tokens. Conceptually, these features represent the information context that triggers and shapes the model's internal reasoning process. By identifying the subspace spanned by these features, the null-space projection operator defines a complementary subspace—the null space—where parameter updates will have no effect on the representations of these crucial thinking tokens.
The instruction-tuned model's task vector (the difference in parameters capturing instruction-following ability) is then projected into this null space. This projection ensures that any parameter updates introduced by the instruction-following component are confined to directions that are orthogonal to, and thus do not interfere with, the model's internal representations and output distribution related to the special thinking tokens. Consequently, the original thinking format distribution of the reasoning model is effectively preserved.
The effectiveness of RAIN-P was validated by measuring the KL divergence on the thinking segment between the original reasoning model and the merged model. Results showed that after applying the null-space projection, the KL divergence remained very low, confirming that the thinking format of the reasoning model was indeed fully preserved.
Stage 2: Instruction-Attention-Guided Merge Coefficients (IAGC)
With the thinking format safeguarded by RAIN-P, the second stage, Instruction-Attention-Guided Merge Coefficients (IAGC), focuses on selectively amplifying the instruction-following capabilities within the constraints established by Stage 1. The key idea here is that different layers and different modules (e.g., attention heads, feed-forward networks) within a transformer architecture contribute dissimilarly to the instruction-following ability. Treating all modules equally, as standard task arithmetic often does, is suboptimal and inefficient.
Instead, RAIN-Merging assigns module-specific scaling coefficients to the projected task vectors obtained from Stage 1. These coefficients serve to amplify the parts of the instruction-tuned task vector that are most relevant to instruction following, while still respecting the null-space property established in the first stage.
The crucial step is determining how to compute these module-specific coefficients. The authors introduce an instruction attention score, motivated by the insight that attention patterns within the model can reveal the importance of each layer or attention head for processing and following instructions. To calculate this score, a small instruction calibration set is constructed. For each sample in this set, three types of spans are carefully annotated:
- The instruction part within the prompt.
- Instruction-relevant parts within the model's response.
- Irrelevant parts within the response.
The underlying principle is that an optimally merged model should exhibit stronger attention to instruction-related content (termed "alignment") and simultaneously suppress attention to irrelevant content (to "avoid leakage"). Based on these annotated attention patterns, the merge coefficients are computed using the instruction attention score for each attention head. This allows for a granular, data-driven approach to weighting the influence of the instruction-tuned task vector across the model's architecture.
Empirical evaluation demonstrated that after applying these coefficient scalings, the merged model exhibited a significantly improved instruction attention score at each layer, indicating a more focused and effective processing of instructional cues.
In summary, RAIN-Merging combines these two stages to deliver three key benefits: it enhances instruction-following capability, maintains both reasoning performance and the structured thinking format, and achieves this through a gradient-free process, making it highly efficient and resource-friendly.
Experimental Setup & Results
▶ Watch: Agentic scenarios and solving the reasoning-instruction coupling problem (8:00)
The evaluation of RAIN-Merging spanned multiple dimensions, demonstrating its effectiveness, efficiency, scalability, and profound impact on model behavior in diverse scenarios.
Effectiveness on Instruction Following:
RAIN-Merging was rigorously tested against existing merging baselines on multiple instruction following benchmarks. The results consistently showed that RAIN-Merging significantly outperformed these baselines. Crucially, this improvement in instruction following did not entail a sacrifice in reasoning or general capability. In fact, the authors reported that in several cases, these core capabilities unexpectedly improved, a phenomenon further explored in the context of the "knowing-doing gap."
Efficiency:
A major advantage of RAIN-Merging is its low computational cost. Being a gradient-free method, it avoids the intensive iterative optimization required by standard supervised fine-tuning (SFT). The experimental results confirmed that RAIN-Merging's computational overhead was substantially lower than that of SFT, making it a highly attractive option for resource-constrained environments.
Scalability:
The method's robustness was demonstrated through its consistent performance gains across different model sizes and architectures. Specifically, RAIN-Merging showed positive and reliable improvements when applied to both Qwen and Llama model families, highlighting its broad applicability and scalability to various large reasoning models.
Evaluation in Agentic Scenarios:
Beyond standard benchmarks, RAIN-Merging was assessed in more complex, real-world-like agentic scenarios using environments such as ALFWorld and WebShop. In these interactive settings, models must not only reason but also interpret and execute multi-step instructions to navigate and achieve goals. RAIN-Merging consistently outperformed the original reasoning models by significantly improving their agentic comprehensiveness, indicating a better ability to understand and act upon instructions within dynamic environments.
Addressing the Coupling Problem:
The research also investigated the "coupling problem," which refers to the inherent difficulty models often face in simultaneously executing complex reasoning and precisely following instructions. The results showed that RAIN-Merging significantly boosted accuracy in tasks where the model needed to get both reasoning and instruction following correct, demonstrating its success in mitigating this challenging trade-off.
Quality of Thinking Process and the "Knowing-Doing Gap":
Perhaps one of the most insightful findings revolved around the impact of RAIN-Merging on the quality of the model's thinking process. The method was shown to maintain the internal consistency of the chain of thought and improve the response alignment to the reasoning process. This effectively closed the "knowing-doing gap," a phenomenon where a model's internal reasoning might be correct, but its final response is erroneous or misaligned with its own deduction.
A concrete GPQA case study vividly illustrated this benefit. The original large reasoning model, presented with a complex problem, performed a detailed, correct option-by-option analysis. It explicitly identified that option C violated required constraints while other options were permissible. However, in its final output line, it unexpectedly produced answer A, directly contradicting its preceding, sound reasoning. This is a classic example of the "knowing-doing gap." In stark contrast, the RAIN-Merged model, while following essentially the same reasoning structure, produced a final answer (option C) that was perfectly consistent with its internal reasoning process.
This gain, the authors emphasized, was not due to improved domain knowledge but rather to enhanced reasoning-response alignment. RAIN-Merging helped the model reliably translate an already sound chain of thought into a correct final decision. This critical improvement in internal consistency and alignment also explains the observed, somewhat counter-intuitive, improvement in reasoning and general benchmarks. By eliminating instances where correct reasoning was undermined by poor instruction following or response misalignment, RAIN-Merging unlocked the full potential of the model's existing reasoning capabilities.
Practical Implications
▶ Watch: Conclusion: Low-cost method for instruction following and reasoning (10:50)
The introduction of RAIN-Merging carries significant practical implications for various stakeholders involved in the development, deployment, and utilization of large language models. Its gradient-free nature and ability to enhance instruction following while preserving core capabilities address several critical pain points in the current ML/systems landscape.
For practitioners and model builders, RAIN-Merging offers a highly attractive, low-cost alternative to traditional fine-tuning methods. The ability to inject robust instruction-following capabilities into powerful reasoning models without resorting to expensive, resource-intensive supervised fine-tuning (SFT) or reinforcement learning (RL) is a game-changer. This means that existing, well-trained reasoning models can be quickly adapted and specialized for agentic and interactive tasks, significantly reducing development cycles and computational budgets. Instead of retraining or extensive fine-tuning, developers can leverage the efficiency of model merging to customize model behavior, making advanced LLM capabilities more accessible and adaptable.
For infrastructure teams and model deployers, the efficiency of RAIN-Merging translates directly into reduced operational costs and complexity. Gradient-free methods require less computational power for adaptation, easing the burden on GPU/TPU clusters. This facilitates faster model iterations and deployments, allowing organizations to respond more agilely to evolving application requirements. The preservation of the model's structured thinking format also ensures stable and predictable outputs, which is crucial for reliable integration into production systems. This predictability minimizes the need for extensive post-deployment monitoring and recalibration, enhancing system stability.
The resolution of the "knowing-doing gap" is a profound benefit for model reliability. By ensuring that a model's correct internal reasoning consistently translates into a correct final response, RAIN-Merging fundamentally improves the trustworthiness and effectiveness of LLMs. This is particularly vital in high-stakes applications where accuracy and consistency are paramount, such as automated agents, medical diagnostics support, or financial analysis. Models empowered by RAIN-Merging are less prone to self-contradiction, leading to more robust decision-making and user experiences.
While the talk did not explicitly detail tradeoffs, the "gradient-free" approach inherently implies a different optimization landscape compared to full SFT. It relies on the existence of pre-trained instruction-tuned models and the specific architecture of task vectors. The creation of an instruction calibration set for attention scoring, while less demanding than a full SFT dataset, still requires some annotation effort. However, these are minor considerations when weighed against the substantial benefits of computational efficiency and capability preservation.
Ultimately, RAIN-Merging empowers the creation of more capable, reliable, and economically viable AI agents and interactive systems. It provides a strategic pathway for organizations to unlock the full potential of their large reasoning models, enabling them to excel not only in complex intellectual tasks but also in practical, instruction-driven applications.
Key Takeaways
- RAIN-Merging is a novel, gradient-free, two-stage method designed to enhance instruction following in large reasoning models.
- It successfully preserves the model's crucial structured thinking format (e.g., special
thinktokens) and its original reasoning capabilities. - The first stage, Reasoning-Aware Null-Space Projection (RAIN-P), ensures thinking format preservation by projecting instruction-tuned task vectors into a null space orthogonal to thinking token features.
- The second stage, Instruction-Attention-Guided Merge Coefficients (IAGC), uses module-specific scaling coefficients derived from instruction attention scores to selectively amplify instruction-following abilities.
- RAIN-Merging significantly outperforms existing merging baselines, demonstrates high computational efficiency, and scales consistently across various model sizes and architectures (e.g., Qwen, Llama).
- It notably improves performance in agentic scenarios (e.g., ALFWorld, WebShop) and resolves the "knowing-doing gap," leading to unexpected improvements in overall reasoning performance by better aligning internal thought with final responses.
About the Speaker(s)
Zhehao Huang is affiliated with Shanghai Jiao Tong University, where he leads research in the field of artificial intelligence and machine learning. He presented this work alongside a team of collaborators, including Yuhang Liu, Baijiong Lin, Yixin Lou, Zhengbao He, Hanling Tian, Tao Li, and his mentor Xiaolin Huang. Their collective work focuses on advancing the capabilities and efficiency of large language models, particularly in the areas of reasoning and instruction following.
Reviews
→ Top-rated talks at International Conference on Learning Representations 2026
All talks from International Conference on Learning Representations 2026