Project description
Third-cycle subject: Computer Science
The doctoral work will be done as part of research project ”AI for Code”.
Here is a one-paragraph summary suitable for a job advertisement:
This PhD project develops a mechanistic interpretability framework to assess and improve the correctness of code generated by large language models (LLMs). Rather than relying on post-hoc behavioral validation through test suites, the project identifies internal “correctness signals” within LLM activations using Sparse Autoencoders (SAEs) for feature decomposition, causal inference for validation, and activation steering to actively guide code generation. The work is organized around three research objectives: decomposing superposed neural representations into interpretable features, modeling the causal relationships between those features and code correctness outcomes, and applying targeted steering interventions to reduce code failures. The project is grounded in prior work on neural program repair and execution-based learning signals, and it will be evaluated on standard benchmarks including HumanEval and BigCodeBench. The expected outcome is an end-to-end interpretability pipeline that provides human-understandable explanations for why an LLM succeeds or fails at generating correct code, with direct relevance to the safe deployment of AI coding tools in high-stakes domains such as healthcare, finance, and defense.
The candidate should have a strong background in computer science. The PhD student is expected to publish in the top conferences and journals in the field of Software Engineering. The working language is English.
Supervision: Martin Monperrus is proposed to supervise the doctoral student. Decisions are made on admission
Admission requirements
To be admitted to postgraduate education (Chapter 7, 39 § Swedish Higher Education Ordinance), the applicant must have basic eligibility in accordance with either of the following:
- passed a second cycle degree (for example a master’s degree), or
- completed course requirements of at least 240 higher education credits, of which at least 60 second-cycle higher education credits, or
- acquired, in some other way within or outside the country, substantially equivalent knowledge
In addition to the above, there is also a mandatory requirement for English equivalent to English B/6.
Selection
In order to succeed as a doctoral student at KTH you need to be goal oriented and persevering in your work. During the selection process, candidates will be assessed upon their ability to:
- independently pursue his or her work
- collaborate with others,
- have a professional approach and
- analyze and work with complex issues.
After the qualification requirements, great emphasis will be placed on personal skills.
Target degree: Doctoral degree
Information regarding admission and employment
Only those admitted to postgraduate education may be employed as a doctoral student. The total length of employment may not be longer than what corresponds to full-time doctoral education in four years’ time. An employed doctoral student can, to a limited extent (maximum 20%), perform certain tasks within their role, e.g. training and administration. A new position as a doctoral student is for a maximum of one year, and then the employment may be renewed for a maximum of two years at a time.
As a doctoral student, you are entitled to a workplace with many employee benefits and monthly salary according to KTH’s Doctoral student salary agreement. Read more about Doctoral studies (PhD) | KTH | Sweden.
Union representatives
Contact information for union representatives.
Doctoral Student’s network (Students’ union on KTH Royal Institute of Technology)
Contact information for PhD chapter.
To apply for the position
Apply for the position and admission through KTH’s recruitment system. It is the applicant’s responsibility to ensure that the application is complete in accordance with the instructions in the advertisement.
Applications must include the following elements:
- Copies of diplomas and grades from previous university studies and certificates of fulfilled language requirements (see above). Translations into English or Swedish if the original document is not issued in one of these languages.Copies of originals must be certified.
- CV including your relevant professional experience and knowledge.
- Application letter with a brief description of why you want to pursue research studies, about what your academic interests are and how they relate to your previous studies and future goals. (Maximum 2 pages long)
- Representative publications or technical reports. For longer documents, please provide a summary (abstract) and a web link to the full text.
Applications must be received at the last closing date at midnight, CET/CEST (Central European Time/Central European Summer Time).
Other information
It may be the case that a position at KTH is classified as a security-sensitive role in accordance with the Protective Security Act (2018:585). If this applies to the specific position, a security clearance will be conducted for the applicant in accordance with the same law with the applicant’s consent. In such cases, a prerequisite for employment is that the applicant is approved following the security clearance.
We firmly decline all contact with staffing and recruitment agencies and job ad salespersons.
Disclaimer: In case of discrepancy between the Swedish original and the English translation of the job announcement, the Swedish version takes precedence.