Course Home

Trustworthy AI for Software Engineering

Explore robust, safe, and evaluable AI-assisted software engineering through lectures, paper discussions, hands-on assignments, and team projects.

Basic Info

Instructor: Dr. Bowen Xu (bxu22@ncsu.edu)

TA: Weiyuan Ding (wding8@ncsu.edu)

TA: Hua Yang (hyang45@ncsu.edu)

Semester: Fall 2026

Schedule: Mon/Wed, 3:00 PM - 4:15 PM

Location: 01226 Koch Hall (formerly Engineering Building 2)

Office Hours: Tue, 2:00 PM - 3:00 PM, Koch Hall (formerly Engineering Building II (EB2)), Room 3228

Resources

Course Outline (Tentative)

Week Date Topic Materials Notes
Class 1 Mon Aug 17 Course Intro [Slides] —
Class 2 Wed Aug 19 Data-centric TAI4SE [Slides] [The Devil is in the Tails: How Long-Tailed Code Distributions Impact Large Language Models]
Class 3 (No class due to school event) Mon Aug 24 Replaced with Data Quality Issues in Code Corpora Assignment (See Assignment section) — —
Class 4 Wed Aug 26 Group project demos - —
Deadline Sun 30 Aug Team Formation NA Submit Team Formation form (one representative member per team should submit the form on behalf of the team)
Class 5 Mon Aug 31 AI Coding Workflow Challenge (In-class activity) [Slides] —
Class 6 Wed Sep 2 Code Representation [Slides] [Stanford CME295 Transformers & LLMs ]
Class 7 Wed Sep 9 Guest Lecture [Slides] Guest speaker: Andre Lustosa (Red Hat)
Class 8 Mon Sep 14 Guest Lecture — Guest speaker: Erkang Zheng (Founder, Ariso + JupiterOne)
Class 9 Wed Sep 16 Group Project Consultant — No class — group project consultant sessions
Class 10 Mon Sep 21 Guest Lecture [Slides] Guest speaker: Rameez Malik
Talk: The Advent of Neurosymbolic AI within Regulatory Affairs
Class 11 Wed Sep 23 Group Project Consultant — No class — group project consultant sessions
Class 12 Mon Sep 28 Assignment Discussion — —
Class 13 Wed Sep 30 Robustness of AI in Coding [Slides] —
Class 14 Mon Oct 5 Guest Lecture [Lean Intelligence: GitHub Copilot Data Science Efforts] Guest speaker: Rahul Pandita (GitHub)
Talk: Lean Intelligence: GitHub Copilot Data Science Efforts
Extra reading: [Quantifying GitHub Copilot's impact on developer productivity and happiness]
Class 15 Wed Oct 7 Model Quantization [Slides] Saima Afrin (William & Mary)
Class 16 Mon Oct 12 Group Project Proposal Presentations [Proposal Slide Template] In-class group project proposal presentations
Class 17 Wed Oct 14 Group Project Proposal Presentations [Proposal Slide Template] In-class group project proposal presentations
Class 18 Wed Oct 21 — — —
Class 19 Mon Oct 26 Code Backdoor Attack and Defense [Slides] [A small number of samples can poison LLMs of any size]
Class 20 Wed Oct 28 Guest Lecture — Guest speaker: Toufique Ahmed (IBM)
Talk: Reproduction Test Generation for SWE Issues: Methods and Challenges
Class 21 Mon Nov 2 Basics of Causal Techniques

Causal Inference Module

These four classes teach how to use causal inference to interpret the security of a model. Every session includes in-class activities and quizzes (they count toward Class activities). Competition Rounds 1–3 run alongside.

Details →
Class 22 Wed Nov 4 Causal Analysis for Interpreting AI Behaviour
Class 23 Mon Nov 9 Lab 1: Causal Effect Estimation
Class 24 Wed Nov 11 Lab 2: Causal Discovery
Class 25 Mon Nov 16 — — —
Class 26 Wed Nov 18 — — —
Class 27 Mon Nov 23 Final Group Project Presentations [Final Presentation Template] In-class final group project presentations
Class 28 Mon Nov 30 Final Group Project Presentations [Final Presentation Template] In-class final group project presentations

Assignments (Tentative)

Assignment Due Materials Notes
Data Quality Issues in Code Corpora Mon Sep 7, 2026, 3:00 PM [Assignment] [Notes]
Code Representation Learning Wed Sep 16, 2026, 3:00 PM [Assignment] [Notes]
Does Quantization Make Code LLMs Brittle? Wed Oct 28, 2026, 3:00 PM [Assignment] —
EVALOOP: Robustness of LLMs in Code Generation Wed Nov 4, 2026, 3:00 PM [Assignment] —

Assignments will be submitted through Gradescope. Detailed instructions will be posted here as they are released.

Causal Inference & Code Backdoor Detection Module

This module

Getting started & Round 1 Wed Oct 28, 9:00 AM – Mon Nov 2, 3:00 PM

Causal classes & Round 2 Mon Nov 2, 3:00 PM – Wed Nov 11, 5:00 PM

Round 3 & final report Wed Nov 11, 5:00 PM – Wed Nov 18, 3:00 PM

From late October to mid-November, the course runs a module that pairs four classes on causal inference with a private Kaggle competition on detecting backdoors (poisoned training samples) in code models. The classes introduce causal inference: telling whether one thing actually causes another, rather than just appearing alongside it. That skill is widely useful in software engineering, machine learning, and data analysis.

[Module overview slides]: what you will do in this module and how it is graded.

Timeline

All dates are in 2026 and all times are Eastern Time (ET).

  1. Wed Oct 28, 9:00 AM

    Module starts: study code, Background Survey, and Competition Round 1

    You receive your study code and a short consent questionnaire by email from TA Hua Yang. Complete the Background Survey (about 10 minutes) first: the Kaggle invitation link is at the end of it. Round 1 closes Mon Nov 2, 3:00 PM. Each round ends with a short submission form (survey).

  2. Mon Nov 2

    Class 1 on causal inference

    Round 1 closes at 3:00 PM.

  3. Wed Nov 4

    Class 2; Competition Round 2 opens

    Round 2 opens at 5:00 PM and closes Mon Nov 9, 3:00 PM.

  4. Mon Nov 9

    Class 3

    Round 2 closes at 3:00 PM.

  5. Wed Nov 11

    Class 4; Competition Round 3 (final) opens

    Round 3 opens at 5:00 PM and closes Wed Nov 18, 3:00 PM.

  6. Wed Nov 18, 3:00 PM

    Round 3 closes; module ends

    Submit the Round 3 submission form.

What you do

Kaggle competition

Detect poisoned training samples (backdoors) in code models, in three rounds:

  • Round 1: Wed Oct 28, 9:00 AM – Mon Nov 2, 3:00 PM
  • Round 2: Wed Nov 4, 5:00 PM – Mon Nov 9, 3:00 PM
  • Round 3: Wed Nov 11, 5:00 PM – Wed Nov 18, 3:00 PM

Complete the Background Survey to get the invitation link. Each round ends with a short submission form. Set your Kaggle team name to your study code.

In-class quizzes

Quizzes during the four causal inference classes. They can only be taken in class.

Final report

A final report at the end of the module. Due date to be announced.

Use your study code, not your name or Unity ID, on the surveys, on the quizzes, and as your Kaggle team name.

Grading

  • Class activities or seminar participation (20%): this module counts here, 20 points in total:
    • In-class quizzes: 4 × 2 points = 8 points
    • Competition rounds: 3 × 3 points = 9 points
    • Final report: 3 points
  • Your grade for each competition round reflects both your leaderboard results and your participation throughout the round (valid submissions during the round and its submission form). Quizzes are graded on both your answers and your participation.

Research study

This module is also part of a research study. Every student does all activities as part of the course; each student chooses whether their data may be used. If you join, you earn 5 points of extra credit by completing the study (staying in it through the end of the module), and you receive a summary of the findings. If you do not join, or withdraw before the end, you can earn the 5 points by recording a 3-minute video introducing one backdoor detection method. The instructor does not know who joined until final grades are posted. Details will come by email.

Group Project

Proposal Milestone

  • Project proposal slides and 5-minute pitch
  • Problem statement + trustworthiness criteria
  • Initial experiment plan
  • Slide template: [Project Proposal Template]

Final Milestone

  • Implementation artifact and report
  • Evaluation with reproducible evidence
  • Presentation with lessons learned
  • Slide template: [Final Presentation Template]

Extra Resources