Problem Statement:

LLMs inherently learn both vulnerable coding patterns along with safe coding patterns. This is based on the vast and unfiltered training data the LLM was trained on. During code generation, they may either take the safe path or the vulnerable path.

Can we look inside the model using mechanistic interpretability to see what causes the model to take the vulnerable path?

Furthermore, how can we steer/modify the model internals so that it follows the safe path instead of the vulnerable one?


List of most relevant Papers:

  1. Repairing LLM Executions for Secure Automatic Programming, ICSE 2026 (Link)

This paper directly tackles the problem that we are trying to solve. It makes use of Sparse Auto Encoders to project the neuron activations into higher dimensional space. This allows for the SAE features to represent a single concept with a sparsity constraint.

  1. Applying sparse autoencoders to unlearn knowledge in language models (Link)

This is another closely related paper. This paper investigates whether SAEs can be used to remove knowledge from language models.


List of other papers relevant to the problem: