TCProF: Time-Complexity Prediction SSL Framework

Joonghyuk Hahn, Hyeseon Ahn, Jungin Kim, Soohan Lim, Yo-Sub Han
2/10/2025
1 citation
cs.SEcs.AI

Official code: peer0/few-shot-tc (3 stars, Python, Apache-2.0, last commit 2025-10-30).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

peer0/few-shot-tcOfficial100%
Apache-2.0

TCProF: Time-Complexity Prediction SSL Framework

32PythonJan 26, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{hahn2025tcprof,
  title  = {TCProF: Time-Complexity Prediction SSL Framework},
  author = {Joonghyuk Hahn and Hyeseon Ahn and Jungin Kim and Soohan Lim and Yo-Sub Han},
  year   = {2025},
  eprint = {2502.15749},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.15749v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.15749.svg)](https://codeofpaper.com/paper/2502.15749)

Discussion