TCProF: Time-Complexity Prediction SSL Framework

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Hahn, Joonghyuk, Ahn, Hyeseon, Kim, Jungin, Lim, Soohan, Han, Yo-Sub
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908276551057408
author Hahn, Joonghyuk
Ahn, Hyeseon
Kim, Jungin
Lim, Soohan
Han, Yo-Sub
author_facet Hahn, Joonghyuk
Ahn, Hyeseon
Kim, Jungin
Lim, Soohan
Han, Yo-Sub
contents Time complexity is a theoretic measure to determine the amount of time the algorithm needs for its execution. In reality, developers write algorithms into code snippets within limited resources, making the calculation of a code's time complexity a fundamental task. However, determining the precise time complexity of a code is theoretically undecidable. In response, recent advancements have leaned toward deploying datasets for code time complexity prediction and initiating preliminary experiments for this challenge. We investigate the challenge in low-resource scenarios where only a few labeled instances are given for training. Remarkably, we are the first to introduce TCProF: a Time-Complexity Prediction SSL Framework as an effective solution for code time complexity prediction in low-resource settings. TCProF significantly boosts performance by integrating our augmentation, symbolic modules, and a co-training mechanism, achieving a more than 60% improvement over self-training approaches. We further provide an extensive comparative analysis between TCProF, ChatGPT, and Gemini-Pro, offering a detailed evaluation of our approach. Our code is at https://github.com/peer0/few-shot-tc.
format Preprint
id arxiv_https___arxiv_org_abs_2502_15749
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle TCProF: Time-Complexity Prediction SSL Framework
Hahn, Joonghyuk
Ahn, Hyeseon
Kim, Jungin
Lim, Soohan
Han, Yo-Sub
Software Engineering
Artificial Intelligence
68T50
I.2.7
Time complexity is a theoretic measure to determine the amount of time the algorithm needs for its execution. In reality, developers write algorithms into code snippets within limited resources, making the calculation of a code's time complexity a fundamental task. However, determining the precise time complexity of a code is theoretically undecidable. In response, recent advancements have leaned toward deploying datasets for code time complexity prediction and initiating preliminary experiments for this challenge. We investigate the challenge in low-resource scenarios where only a few labeled instances are given for training. Remarkably, we are the first to introduce TCProF: a Time-Complexity Prediction SSL Framework as an effective solution for code time complexity prediction in low-resource settings. TCProF significantly boosts performance by integrating our augmentation, symbolic modules, and a co-training mechanism, achieving a more than 60% improvement over self-training approaches. We further provide an extensive comparative analysis between TCProF, ChatGPT, and Gemini-Pro, offering a detailed evaluation of our approach. Our code is at https://github.com/peer0/few-shot-tc.
title TCProF: Time-Complexity Prediction SSL Framework
topic Software Engineering
Artificial Intelligence
68T50
I.2.7
url https://arxiv.org/abs/2502.15749