arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.09049cs.AIcs.SE
收藏

MEC$^3$O:代码时间复杂度预测的多专家共识

MEC$^3$O: Multi-Expert Consensus for Code Time Complexity Prediction

Department of Computer Science, Yonsei University(延世大学计算机科学系)

Joonghyuk Hahn, Soohan Lim, Yo-Sub Han

AI总结:

提出MEC$^3$O多专家共识系统,基于性能分配LLM到复杂度类别并加权整合辩论结果,在CodeComplex上准确率与宏F1至少提升10%,超越开源基线并媲美GPT-4o系列。

摘要:

预测源代码的复杂度对于软件开发和算法分析至关重要。近期,Baik等人(2025)引入了CodeComplex用于代码时间复杂度预测。该论文表明,未经微调的LLM在处理某些复杂度类别时存在困难。这表明没有单一的LLM能在所有类别中表现出色,而是每个模型在特定类别中具有优势。我们提出了MEC$^3$O,一个多专家共识系统,它扩展了多智能体辩论框架。MEC$^3$O根据LLM的性能将其分配到不同的复杂度类别,并为其提供类别专用的指令,使其成为专家。这些专家进行结构化辩论,其预测通过加权共识机制进行整合。我们对LLM的专家分配有效处理了思维退化(Degeneration-of-Thought),减少了对单独评判模型的依赖,并防止收敛到错误的多数意见。在CodeComplex上的实验表明,MEC$^3$O优于开源基线,准确率和宏F1分数至少提高10%。它还在宏F1分数上平均超越了GPT-4o-mini,并在平均F1分数上与GPT-4o和GPT-o4-mini相当。这证明了多专家辩论和权重共识策略在生成最终预测方面的有效性。我们的代码和数据可在https://github.com/suhanmen/MECO获取。

英文摘要:

Predicting the complexity of source code is essential for software development and algorithm analysis. Recently, Baik et al. (2025) introduced CodeComplex for code time complexity prediction. The paper shows that LLMs without fine-tuning struggle with certain complexity classes. This suggests that no single LLM excels at every class, but rather each model shows advantages in certain classes. We propose MEC$^3$O, a multi-expert consensus system, which extends the multi-agent debate frameworks. MEC$^3$O assigns LLMs to complexity classes based on their performance and provides them with class-specialized instructions, turning them into experts. These experts engage in structured debates, and their predictions are integrated through a weighted consensus mechanism. Our expertise assignments to LLMs effectively handle Degeneration-of-Thought, reducing reliance on a separate judge model, and preventing convergence to incorrect majority opinions. Experiments on CodeComplex show that MEC$^3$O outperforms the open-source baselines, achieving at least 10% higher accuracy and macro-F1 scores. It also surpasses GPT-4o-mini in macro-F1 scores on average and demonstrates competitive on-par F1 scores to GPT-4o and GPT-o4-mini on average. This demonstrates the effectiveness of multi-expert debates and weight consensus strategy to generate the final predictions. Our code and data is available at https://github.com/suhanmen/MECO.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑