Skip to content

devendrasaim/automatic-program-repair-steering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Automatic Program Repair Through Activation Steering (Reference Implementation)

Note: This repository contains the core logic and reference architecture for the Master's Creative Component project submitted to Iowa State University (Dec 2025). The full dataset and HPC logs are archived at the university, but the core steering algorithms and full project report are provided here.

πŸ“Œ Abstract

This project introduces a training-free method for enhancing the reliability of CodeLLMs (Large Language Models) in Automatic Program Repair (APR) tasks. By leveraging Activation Steering, we compute a "correctness vector" ($\vec{v}_{c}$) from contrastive buggy/fixed code pairs. This vector is injected into the model's residual stream during inference to "nudge" the generation toward functionally correct patches.

πŸš€ Key Results

Experiments on CodeLlama-7B and Qwen-7B/14B showed:

  • Elimination of Invalid Code: Reduced invalid generation rate from 4.38% to 0.00%.
  • Accuracy Boost: CodeLlama-7B accuracy increased from 48.12% to 56.25%.

πŸ“‚ Project Structure

  • src/: Core hooking logic (PyTorch).
  • scripts/: Vector computation and evaluation pipelines.
  • docs/: Full Creative Component Report (PDF).

πŸ“„ Full Report

For detailed mathematics and results, read the full report: πŸ‘‰ Read the Full Report

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages