Practical, Explainable, and Actionable AI for Secure Software Dev.
CI/CD
CI Build Failure�Prediction [FSE’24]
Coding
PyCoder: Code Completion [IST’24]
Testing
Code to test case generation
Text to Test case generation�Fuzzing [ICSE’23, ICSE’24]
Code Review
Reviewer Recommendation [SANER’15]
Review Localization [SANER’22]
Review Comment Generation [FSE’22]
Bug Reports
Bug Localization, Bug Triage [ISSRE’13]
Defects
Defect Prediction�[ICSE’15, ICSE’16, TSE’15,’16,’17,’19]
Agile
GPT2SP: Story Point Estimation [TSE’22]�Augmented Agile [IEEE SW]
Vulnerability
Make AI4SE More Practical, Explainable, and Actionable!
XAI4SE Book/Tutorial/Papers [ASE’21, MSR’21, TSE’22]
Locate vulnerability/defective lines [MSR’21, MSR’22]
Explain vulnerability/defects [ASE’21, TSE’23, TOSEM’24]
Repair the vulnerability/defects [FSE’22, ICSE’22]
AIBugHunter in VSCode [EMSE’23]
AI for SE
Dr. Kla Tantithamthavorn
Chief Investigator
Responsible AI in MLOps/LLMOps
SE for AI
Fairness,biases,ethical issues in AI software [EMSE’24, TOSEM’24]
The Risks of Using ChatGPT and LLMs for SE Tasks [2xTOSEM’24]
FIT Collab
Explainable AI
Dr. Kla Tantithamthavorn
Senior Lecturer in Software Engineering
Monash University, Australia
http://chakkrit.com @klainfo
Software Engineering in the Age of Generative AI, Yet Not Explainable!
Dr. Kla Tantithamthavorn
Learn more http://chakkrit.com/
Disclaimer
Traditionally, AI is Used to Support Decision-Makings
“Actionable Analytics: Stop Telling Me What It Is; Please Tell Me What To Do.” Tantithamthavorn, Chakkrit et al. IEEE Softw., 2021�"A survey on deep learning for software engineering." Yang, Yanming, et al. ACM Computing Surveys (CSUR) 54.10s (2022): 1-73.
Predict Defects, So What? Tell Me Why?
Explainable AI for Defect Prediction (PyExplainer)
Explainable AI for Defect Prediction (PyExplainer)
“To build a local model to approximate the behaviours of the global model”
Explainable AI for Defect Prediction (PyExplainer)
What-if we change this, would it reverse the prediction of defect models?
Explainable AI for Agile Story Point Estimation (GPT2SP)
A GPT-2 pre-trained language model to estimate story points with explanations.
GPT2SP: A Transformer-Based Agile Story Point Estimation Approach Michael Fu, and Chakkrit Tantithamthavorn IEEE Trans. Software Eng., 2023
What are the best supporting examples that have the same word and the same story point from the same project?
AIBugHunter: A Practical Tool for Predicting, Classifying and Repairing Software Vulnerabilities, Michael Fu, Chakkrit Tantithamthavorn, Trung Le, Yuki Kume, Van Nguyen, Dinh Phung, John Grundy, Empirical Software Engineering (2023).
Explainable AI for Cybersecurity (AIBugHunter)
Problem: Cyber criminals continue to find new methods of attack, e.g., stealing your credit card information and password, asking to pay money, damaging business’s reputation and customer’s trusts.
Solution: AIBugHunter is an AI-powered approach that is learned from millions of software projects to understand the patterns of vulnerabilities so it can automatically detect, locate, explain, and suggest corrections in real-time.
Decades of Explainability in SE
Early Days of Explainability in SE (2000-2015)
AI4SE Booming Age (2015-2020)
40 Years of Defect Prediction Studies, Does it Help Any?
Practitioners’ Needs�(User Survey)
Researchers’ Focuses�(Literature Review)
The REAL NEEDS of Explainable AI in SE
http://xai4se.github.io
Explainable AI in a Nutshell
Data
Black box AI
AI Product
Data
Explainable AI
Explainable AI product
Decision, recommendation
Decision & explanation
Feedback
Confusion with AI Black box�Why did you do that?
Why did you not do that?
Why do you succeed or fail?
How do I correct an error?
Clear & transparent predictions
I understand why
I understand why not
I know why you succeed or fail
I understand, so I trust you
The Explainable AI (XAI) aims to create a suite of AI/ML techniques that: (David Gunning, 2016)
Two Types + Scopes of Explainable AI
Interpretable AI
Explainable AI
There Are Many Explainable AI Toolkits
Different Explainable AI Techniques = Different Explanations
Different Stakeholders Need Different Explanations
To make AI more explainable, we need to:
Human-Centric SE approaches must be used to design explanations to most suit practitioners’ needs
AI Has Emerged as a Powerful Tool for Software Companies
Syntax-Aware On-the-Fly Code Completion, Wannita Takerngsaksiri, Chakkrit Tantithamthavorn, Yuan-Fang Li, Under Review at IEEE Transactions on Soft. Eng. (2023)
Generative AI (ChatGPT, LLMs, etc.)
What Software Engineering Tasks that ChatGPT Can Help?
ChatGPT for Software Planning (Generate Business Requirements)
ChatGPT for Software Planning (Generate User Stories)
ChatGPT for Software Design
ChatGPT for Software Design (Generate a Class Diagram)
ChatGPT for Software Design (Generate a State Diagram)
ChatGPT for Coding
ChatGPT for Coding
ChatGPT for Software Testing
ChatGPT for Software Testing (Generate acceptance test cases)
ChatGPT for Software Testing (Generate test cases)
ChatGPT Is Dumber Than You Think
Here is the fundamental problem with ChatGPT: it can provide answers and information that no one ever knows for sure is true because it is not referenceable.
Challenge 1: ChatGPT Can’t Generate High-Quality Code
We analyzed 4,066 ChatGPT- generated code implemented in two popular programming languages, i.e., Java and Python, for 2,033 LeetCode’s programming tasks.
Key Findings:
Liu, Yue, et al. "Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issues." Under Review at TOSEM, 2023.
Challenge 2: ChatGPT Can’t Generate Secure Code
Context: this program receives an email address as input, and passes it to a program (as a parameter) through a shell.
Problem: Handling input in this manner allows a malicious adversary to execute arbitrary code by appending shell instructions to a fictitious email. �CWE: Arbitrary code execution (CWE-94)
First Attempt
Asleep at the Keyboard? Assessing the Security of GitHub Copilot’s Code Contributions, IEEE S&P 2021
Challenge 2: ChatGPT Can’t Generate Secure Code
Context: this program receives an email address as input, and passes it to a program (as a parameter) through a shell.
Problem: Handling input in this manner allows a malicious adversary to execute arbitrary code by appending shell instructions to a fictitious email. �CWE: Arbitrary code execution (CWE-94)
Second Attempt
Challenge 2: ChatGPT Can’t Generate Secure Code
Context: this program receives an email address as input, and passes it to a program (as a parameter) through a shell.
Problem: Handling input in this manner allows a malicious adversary to execute arbitrary code by appending shell instructions to a fictitious email. �CWE: Arbitrary code execution (CWE-94)
Last Attempt, Otherwise I will give up!
Challenge 2: ChatGPT Can’t Generate Secure Code
Context: this program receives an email address as input, and passes it to a program (as a parameter) through a shell.
Problem: Handling input in this manner allows a malicious adversary to execute arbitrary code by appending shell instructions to a fictitious email. �CWE: Arbitrary code execution (CWE-94)
With human intervention!
Challenge 3: ChatGPT Can’t Explain the Answers
Take-Away Messages:
Learn more http://chakkrit.com/
Designing an Explanation
Developing and Evaluating XAI4SE techniques
Learn more http://chakkrit.com/