Sagnik Anupam
Author directory2026
LLM Program Optimization via Retrieval Augmented Search
Sagnik Anupam | Alexander Shypula | Osbert Bastani
Findings of the Association for Computational Linguistics: ACL 2026
Sagnik Anupam | Alexander Shypula | Osbert Bastani
Findings of the Association for Computational Linguistics: ACL 2026
Recent work has demonstrated the potential of large language models (LLMs) for program optimization, a key challenge in programming languages. We propose a blackbox adaptation method called Retrieval Augmented Search (RAS) that performs beam search over candidate optimizations; at each step, it retrieves in-context examples from a given training dataset of slow-fast program pairs to guide the LLM. Critically, we find that performing contextual retrieval based on an LLM-generated natural language description significantly outperforms retrieval based on the source code. We also propose AEGIS, a method for improving interpretability by decomposing training examples into "atomic edits” that are significantly more incremental in nature. We show that RAS performs up to 2.06× better than prior state-of-the-art blackbox adaptation strategies on optimizing C++ programs, and that AEGIS performs up to 1.37× better while making significantly smaller edits. We also show that using RAS improves the mean runtime percentile of Python programs by 10.27 compared to baselines.
RoboReason: Boosting Robotics-Relevant VLM Reasoning Through Scalable Data Generation
Sagnik Anupam | Utkarsh Lal | Aneesh Edara | Botong Zhang | Yao Tang | Jiatao Gu | Dinesh Jayaraman | Osbert Bastani
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Sagnik Anupam | Utkarsh Lal | Aneesh Edara | Botong Zhang | Yao Tang | Jiatao Gu | Dinesh Jayaraman | Osbert Bastani
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Vision-Language Models (VLMs) have demonstrated impressive performance when integrated into robot manipulation pipelines, but real-world evaluation of VLM capabilities on downstream robotics tasks is both difficult and expensive to scale. We propose that spatial and temporal ordering tasks using images from stereo and wrist cameras attached to real-world robots are particularly well-suited for evaluating visual reasoning capabilities, as they assess skills directly applicable to robots. We evaluate VLM reasoning abilities on three questions: ordering shuffled frames conditioned on a language description of the task, ordering objects depthwise based on distance from the camera, and ordering objects from left-to-right in pixel coordinates. The complexity of these tasks can also be modulated by changing the size of the set to sort. Our experiments show that several state-of-the-art vision-language models struggle on ordering tasks. To fix this, we propose a scalable autonomous training data generation pipeline, and show that both supervised finetuning and reinforcement-learning on the generated data can significantly improve VLM reasoning performance both on spatiotemporal ordering tasks as well as downstream robotics and visual reasoning tasks.