Files
logseq/pages/PAPERS___ASE-GPTSniffer.md
2025-06-05 22:07:12 +02:00

57 lines
8.1 KiB
Markdown

full-title:: Is this snippet written [[by]] [[ChatGPT]] ? Detecting [[source]] [[code]] provenance using CodeBERT
type:: [[ConferencePaper]]
external-links::
date-submitted:: [[05-05-2023]]
todoist:: https://todoist.com/showTask?id=6768674124
year:: 2023
status:: [[REJECTED]]
venue:: [[ASE]]
- ## TODOs
- DONE Vedere la sezione experiment
date-submitted:: [[05-05-2023]]
- DONE Vedere Conclusion
date-submitted:: [[04-05-2023]]
- DONE Vedere sezione related [[WORK]]
date-submitted:: [[03-05-2023]]
-
-
- ## WRITING [[Notes]]
- La sezione motivazione dovrebbe presentare il problema.
- Qualcosa e' stato già detto nella intro anche se forse troppo sbilanciato sulla questione students
- Qualche spunto da ChatGPT
- Spunto 1
- Code generation is the process of using AI models to create or complete code based on human instructions or tests. Some examples of AI-based code generators are GitHub Copilot, OpenAI Codex, and Tabnine. These tools can help programmers code faster, learn new languages or frameworks, and focus on solving bigger problems. However, AI-generated code may have security flaws or low-quality issues that need to be checked by human developers. Moreover, AI-generated code may not be original or ethical, as it may copy snippets from public code repositories without proper attribution or consent. Therefore, it is crucial to recognize source code generated by AI and verify its quality, security, and originality before using it in production.
- Spunto 2
- Recognizing source code generated by AI is important because it can help you avoid security flaws or low quality issues that may arise from using AI models to auto-complete or create code based on human instructions or tests.
- Recognizing source code generated by AI is important because it can help you learn from the best practices and coding patterns that are derived from billions of lines of code available in the public domain, such as GitHub repositories.
- Recognizing source code generated by AI is important because it can help you leverage the capabilities of large language models (LLMs) that can generate everything from simple essays to actual financial models with natural language prompts.
- Recognizing source code generated by AI is important because it can help you improve your productivity and focus on solving bigger problems, while letting the AI handle the boilerplate and repetitive code patterns.
- Spunto 3
- Artificial intelligence (AI) is becoming more and more powerful and ubiquitous in our daily lives. From personal assistants to self-driving cars, AI is transforming the way we interact with the world. But AI is not only a tool for humans, it is also a creator of content. AI can generate text, images, music, code and more, sometimes with astonishing quality and creativity.
- However, not all AI-generated content is benign or trustworthy. Some AI systems can produce fake news, spam, phishing emails, malware or even deepfakes that can deceive or harm people. Therefore, it is important to be able to recognize source code generated by AI and distinguish it from human-written code. This can help us avoid falling victim to malicious AI attacks or misusing AI-generated code that may contain errors or vulnerabilities.
- One recent example of why this skill is important is the case of Copilot, a code suggestion tool developed by GitHub and OpenAI. Copilot uses a large neural network trained on billions of lines of code to generate code snippets based on natural language queries. While Copilot can be very helpful and convenient for developers, it can also generate problematic code that may violate licenses, contain security flaws or produce incorrect results.
- According to a study by researchers from the University of California San Diego and Microsoft Research, Copilot generated incorrect code in 40% of cases and insecure code in 12% of cases when tested on a set of common programming tasks. Moreover, Copilot sometimes copied code verbatim from its training data, which may infringe the intellectual property rights of the original authors or introduce unwanted dependencies or bugs.
- Therefore, developers who use Copilot or similar tools should be careful and vigilant when accepting or modifying the suggested code. They should also be able to recognize when the code is generated by AI and when it is written by humans. This can help them avoid potential legal, ethical or technical issues that may arise from using AI-generated code.
- Recognizing source code generated by AI is not an easy task, but it is not impossible either. There are some clues and indicators that can help us differentiate between human-written and AI-generated code. For example, human-written code usually follows certain coding standards, conventions and best practices that may not be respected by AI-generated code. Human-written code also tends to have more comments, documentation and tests that explain the logic and purpose of the code. AI-generated code may lack these elements or have irrelevant or misleading comments.
- Another way to recognize source code generated by AI is to look for patterns, repetitions or anomalies that may reveal the limitations or biases of the AI system. For example, AI-generated code may use uncommon or inconsistent variable names, function names or syntax. It may also repeat the same code blocks or statements multiple times or generate code that does not match the intended functionality or specification.
- In conclusion, recognizing source code generated by AI is an important skill that can help us protect ourselves from malicious or faulty AI content. It can also help us improve our own coding skills and learn from the strengths and weaknesses of AI systems. By being aware of the differences between human-written and AI-generated code, we can make better use of the amazing tools and resources that AI offers us.
- Concerning the related [[WORK]]:
- Hi all, I'm mostly done on related [[WORK]], but I have a few doubts on the section about CodeBERT:
1) is this related [[WORK]], or we mention these words just because \GS is also based on CodeBERT?
2) I think there is a lot more about the application of CodeBERT to SE problems
3) More importantly, CodeBERT is only one pretrained model of [[code]]. nowadays [[authors]] are using other models (CodeT5, but also GPTx models) for similar problems). So the reader may wonder why these are not mentioned.
- if needed we can shorten it, rephrase, and put it at the end, citing a survey containing much more about the topic
https://doi.org/10.1145/3485275
- Some [[Notes]]
- The success of pre-trained models in the natural [[language]] domain has also spawned a [[series]] of pre-trained models for programming [[language]] understanding and generation, including CodeBERT [11], GraphCodeBERT [13], PLBART [2], and the usage of T5 to support code-related tasks [28]. Since the proposed approach is based on CodeBERT, in the following we report only some of the recent [[WORK]] based on such a pretrained models. However, interesting reader can refert to \cite where [[authors]] presents a systematic literature [[Comments]] on the use of deep learning in software engineering.
- [11] Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, X. Feng, Ming Gong, Linjun Shou, Bing Qin, Ting Liu, Daxin Jiang, and M. Zhou. 2020. CodeBERT: A PreTrained Model for Programming and Natural Languages. ArXiv abs/2002.08155 (2020).
- [13] Daya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng, Duyu Tang, Shujie Liu, Long Zhou, Nan Duan, Jian Yin, Daxin Jiang, and M. Zhou. 2021. GraphCodeBERT: Pre-training [[Code]] Representations with Data Flow. ArXiv abs/2009.08366 (2021)
- [2] Daya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng, Duyu Tang, Shujie Liu, Long Zhou, Nan Duan, Jian Yin, Daxin Jiang, and M. Zhou. 2021. GraphCodeBERT: Pre-training [[Code]] Representations with Data Flow. ArXiv abs/2009.08366 (2021)
-
-
-
- [[RelatedWork]]
- [[@Can ChatGPT Reproduce Human-Generated Labels - A Study of Social Computing Tasks]]
- [[@Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributions]]
-