Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Software Engineering in the Age of Generative AI

Software Engineering in the Age of Generative AI

Software engineering in the age of Generative AI is a rapidly evolving field that presents both opportunities and challenges. Generative AI has the potential to revolutionize software development by automating repetitive tasks (e.g., code generation, testing, and bug fixing), improving efficiency, enhancing creativity, and reducing costs. Unfortunately, such models are still treated as “black-box”, lacking explanations on how they arrive at their generated code.

More Decks by Chakkrit (Kla) Tantithamthavorn

Other Decks in Technology

Transcript

  1. 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
  2. Dr. Kla Tantithamthavorn • Expertise in Explainable AI and Software

    Engineering • Co-authored the first online book on Explainable AI for Software Engineering (http://xai4se.github.io), attracting over 20,000 page views from 83 countries worldwide • Co-edited an IEEE Software Special Issue on XAI for SE • Awarded ARC DECRA Fellowship, JSPS Fellowship, ACM SIGSOFT Distinguished Paper, Distinguished Reviewer • Received strong media attention from Gizmodo, Australian Cyber Security Magazine, TechXplore, Cybersecurity Connect, Australian Computer Society, etc Learn more http://chakkrit.com/
  3. 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)
  4. Generative AI (ChatGPT, LLMs, etc.) • Since its introduction in

    November 2022, ChatGPT has rapidly gained popularity due to its remarkable ability in language understanding and human-like responses • Generative AI is a type of artificial intelligence that is capable of creating original and unique content, such as images, videos, music, or text. It works by learning patterns and styles from existing data and generating new content. • ChatGPT, based on GPT-3.5 architecture, has shown great promise for revolutionizing various research fields, including code generation, testing, and bug fixing, improving efficiency, enhancing creativity, and reducing costs.
  5. 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.
  6. 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: • Code quality issues commonly happen in both code that pass or failed test cases, highlighting the need for characterizing and addressing these concerns alongside the functional correctness. • Issues in ChatGPT-generated code can be categorized into four categories: Compilation & Runtime Errors, Wrong Outputs, Code Style & Maintainability, Performance & Efficiency • Wrong Outputs and Code Style & Maintainability issues are the most common challenges faced by the ChatGPT-generated code, while Compilation & Runtime Errors and Performance & Efficiency issues are less prevalent. Liu, Yue, et al. "Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issues." Under Review at TOSEM, 2023.
  7. 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
  8. 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
  9. 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!
  10. 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!
  11. Take-Away Messages: - Generative AI will transform SE. - However,

    it still can’t generate high-quality, secure, explainable code. - Generative AI should be used as an assistant tool, but not to replace software engineers. Learn more http://chakkrit.com/