Shubham Gandhi
Author directory2026
Steer, Don’t Solve: Training Small Critic Models for Large Code Agents
Shubham Gandhi | Yiqing Xie | Atharva Naik | Ruichen Zhu | Carolyn Rose
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Shubham Gandhi | Yiqing Xie | Atharva Naik | Ruichen Zhu | Carolyn Rose
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Coding tasks are typically complicated and require multiple capabilities, ranging from high-level planning to low-level implementation. While coding agents are optimized for the joint capabilities, individual capabilities may have different optima, and high-level planning remains a major bottleneck. To address this challenge, we train a separate critic model that is specialized in high-level planning to steer the coding agent in inference. We construct SFT and DPO data to train the critic model to identify errors made by the coding agent and provide correct and clear high-level guidance without generating concrete actions. Experiments show that our fine-tuned 4B and 8B critic models significantly improve the performance of 6 larger coding agents (e.g., improving the resolved rates of GLM-4.7-Flash-30B-A3B and GPT-OSS-120B by 16.0% and 14.4% on SWE-Bench Verified). The critic model also reduces the total inference costs for some coding agents by solving tasks in fewer steps (e.g., reducing the per-example inference cost for GPT-OSS-20B from 0.07 to 0.03). We provide the code in https://github.com/shubhamrgandhi/critic-training.
2025
An Empirical Study on Strong-Weak Model Collaboration for Repo-level Code Generation
Shubham Gandhi | Atharva Naik | Yiqing Xie | Carolyn Rose
Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing
Shubham Gandhi | Atharva Naik | Yiqing Xie | Carolyn Rose
Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing
We study cost-efficient collaboration between strong and weak language models for repository-level code generation, where the weak model handles simpler tasks at lower cost, and the most challenging tasks are delegated to the strong model. While many works propose architectures for this task, few analyze performance relative to cost. We evaluate a broad spectrum of collaboration strategies: context-based, pipeline-based, and dynamic, on GitHub issue resolution. Our most effective collaborative strategy achieves equivalent performance to the strong model while reducing the cost by 40%. Based on our findings, we offer actionable guidelines for choosing collaboration strategies under varying budget and performance constraints. Our results show that strong–weak collaboration substantially boosts the weak model’s performance at a fraction of the cost, pipeline and context-based methods being most efficient.