Code Detection for Hardware Acceleration Using Large Language Models

07/19/2023
by   Pablo Antonio Martínez, et al.
0

Large language models (LLMs) have been massively applied to many tasks, often surpassing state-of-the-art approaches. While their effectiveness in code generation has been extensively studied (e.g., AlphaCode), their potential for code detection remains unexplored. This work presents the first analysis of code detection using LLMs. Our study examines essential kernels, including matrix multiplication, convolution, and fast-fourier transform, implemented in C/C++. We propose both a preliminary, naive prompt and a novel prompting strategy for code detection. Results reveal that conventional prompting achieves great precision but poor accuracy (68.8 due to a high number of false positives. Our novel prompting strategy substantially reduces false positives, resulting in excellent overall accuracy (91.1 challenge to existing state-of-the-art code detection methods.

READ FULL TEXT
research
05/23/2018

WisenetMD: Motion Detection Using Dynamic Background Region Analysis

Motion detection algorithms that can be applied to surveillance cameras ...
research
05/24/2023

Who Wrote this Code? Watermarking for Code Generation

Large language models for code have recently shown remarkable performanc...
research
08/29/2023

Large Language Models in Fault Localisation

Large Language Models (LLMs) have shown promise in multiple software eng...
research
11/01/2019

Twin-Finder: Integrated Reasoning Engine for Pointer-related Code Clone Detection

Detecting code clones is crucial in various software engineering tasks. ...
research
07/30/2023

A Private Watermark for Large Language Models

Recently, text watermarking algorithms for large language models (LLMs) ...
research
08/17/2022

ASTRO: An AST-Assisted Approach for Generalizable Neural Clone Detection

Neural clone detection has attracted the attention of software engineeri...
research
07/08/2023

A Stitch in Time Saves Nine: Detecting and Mitigating Hallucinations of LLMs by Validating Low-Confidence Generation

Recently developed large language models have achieved remarkable succes...

Please sign up or login with your details

Forgot password? Click here to reset