Spandan Garg

Logo

Resume | LinkedIn | GitHub | Google Scholar

I work as a Data & Applied Scientist in the Visual Studio Data Science Team at Microsoft (2020 - Present).

Previously, Software Engineering at University of Waterloo (2015 - 2020).

Portfolio

Updates

Jan 26, 2023: RAPGen work submitted to ICML’23 Research Track! “RAPGen: An Approach for Detecting and Fixing Code Inefficiencies in Zero-Shot

Patents and Publications


Spandan Garg, Roshanak Zilouchian Moghaddam, and Neel Sundaresan. 2023. RAPGen: An Approach for Detecting and Fixing Code Inefficiencies in Zero-Shot. Filed Jan 23rd., 2023. Patent Pending.

Spandan Garg, Roshanak Zilouchian Moghaddam, Colin B. Clement, Neel Sundaresan and Chen Wu. 2022. DeepDev-PERF: A Deep Learning-Based Approach For Improving Software Performance. In Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE’2022).

Roshanak Zilouchian Moghaddam*, Spandan Garg*, Colin B. Clement*, Yevhen Mohylevskyy and Neel Sundaresan. 2022. Generating Examples from CLI Usage: Can Transformers Help?. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD’2022).

Spandan Garg, Paul Harrington, Roshanak Zilouchian Moghaddam, Chen Wu and Neel Sundaresan. 2021. System and Method For Identifying Performance Bottlenecks. Filed November 12th., 2021. Patent Pending.

Spandan Garg, Roshanak Zilouchian Moghaddam, Chen Wu, and Neel Sundaresan. 2021. PerfLens: A Data-driven Performance Bug Detection and Fix Platform. In Proceedings of the 10th ACM SIGPLAN International Workshop on the State of the Art in Program Analysis (SOAP’2021).

Spandan Garg, Paul Harrington, Roshanak Zilouchian Moghaddam, and Chen Wu. 2021. Performance Bug Detection and Code Recommendation. Filed March 10th., 2021. Patent Pending.

Spandan Garg, Roshanak Zilouchian Moghaddam, Yevhen Mohylevskyy and Jason Shaver. 2019. Command-line Script Generation with Relevance Search. U.S. Patent Application 20210342357, Filed May 1st., 2020. Patent Pending.

Spandan Garg*, Roshanak Zilouchian Moghaddam*, Jason Shaver and Neel Sundaresan. 2019. Machine Generated Examples of Command-line Commands with Parameter Values. U.S. Patent Application 20210342654, Filed April 29th., 2020. Patent Pending.

* Equal Contribution

AI For Software Engineering


DeepPERF: A Deep Learning-Based Approach For Improving Software Performance (Paper)

Improving software performance is an important yet challenging part of the software development cycle. Today, the majority of performance inefficiencies are identified and patched by performance experts. Recent advancements in deep learning approaches and the wide-spread availability of open source data creates a great opportunity to automate the identification and patching of performance problems. In this paper, we present DeepPERF, a transformer-based approach to suggest performance improvements for C# applications. We pretrain DeepPERF on English and Source code corpora and followed by finetuning for the task of generating performance improvement patches for C# applications. Our evaluation shows that our model can generate the same performance improvement suggestion as the developer fix in more than 53% of the cases, getting roughly 34% of them verbatim in our expert-verified dataset of performance changes made by real C# developers. Additionally, we evaluate DeepPERF on 50 open source C# repositories on GitHub using both benchmark and unit tests and find that our model is able to suggest valid performance improvements that can improve both CPU usage and Memory allocations. So far we've submitted 19 pull-requests with 28 different performance optimizations and 9 of these PRs have been approved by the project owners.

PerfLens: A Data-Driven Performance Bug Detection and Fix Platform (Paper)

PerfLens is a data-driven approach to software performance improvement in C#. We first compile a large dataset of hundreds of performance improvements made in open source projects. We then leverage this data to build a tool called PerfLens for performance improvement recommendations via code search. PerfLens indexes the performance improvements, takes a codebase as an input and searches a pool of performance improvements for similar code. We show that when our system is further augmented with profiler data information our recommendations are more accurate. Our experiments show that PerfLens can suggest performance improvements with 90% accuracy when profiler data is available and 55% accuracy when it analyzes source code only.

Optimization Insights (Ongoing)

Bottleneck detection in ETW Traces: Developed a bottleneck detection approach for .NET applications by identifying patterns of function calls corresponding to known performance issues among call-stacks in profiler traces. This has been integrated into the Azure Application Insights Profiler and was also demoed at VSLive! Conference (2021) keynote. Sign up for our private preview!

Generating Examples from CLI Usage: Can Transformers Help? (Paper, Patent)

Continuous evolution in modern software often causes documentation, tutorials, and examples to be out of sync with changing interfaces and frameworks. Relying on outdated documentation and examples can lead programs to fail or be less efficient or even less secure. In response, programmers need to regularly turn to other resources on the web such as StackOverflow for examples to guide them in writing software. We recognize that this inconvenient, error-prone, and expensive process can be improved by using machine learning applied to software usage data. In this work, we present our practical system which uses machine learning on large-scale telemetry data and documentation corpora, generating appropriate and complex examples that can be used to improve documentation. We discuss both feature-based and transformer-based machine learning approaches and demonstrate that our system achieves 100% coverage for the used functionalities in the product, providing up-to-date examples upon every release and reduces the numbers of PRs submitted by software owners writing and editing documentation by >68%. We also share valuable lessons learnt during the 3 years that our production quality system has been deployed for Azure Cloud Command Line Interface (Azure CLI).




Genie: Human Language to Azure CLI Snippets (Patent)

Genie is a AI tool that translates human language queries to snippets of Azure CLI commands. We first create an index of common snippets by splitting the telemetry into usage sessions and mining frequent sequences of successful commands. Given a human language query, we use FastText word embeddings and Azure documentation to resolve out of vocab (OoV) words, fix typos, perform query expansion, etc. We then leverage the hierarchical nature of CLI modules to score the query against the different modules, command groups and commands in CLI and produce a ranked list of snippets based on the aggregated scores of their component commands. This approach was demoed at the Microsoft Azure+AI Conference (2019).

VS Code Extension Demo:



Hobbies & Side-Projects


Voxels Game Engine

View on GitHub View Demo

A game engine I wrote from scratch using C++ and OpenGL.




4Kb Demo Scenes

View on GitHub View Demo

Ray-Marching demos I wrote using C++, OpenGL and GLSL.




Overworld RPG Game Engine

View on GitHub

A 2D game engine I wrote using javascript and HTML.




Sketching

View My Artwork

Outside of work, I also enjoy art, particularly sketching. Below are a few of my sketches that I felt turned out well. Visit my Tumblr to view my other works!




© 2023 Spandan Garg.