AISEOct 10, 2025

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

arXiv:2510.09049v1h-index: 5Has Code
Originality Incremental advance
AI Analysis

This work addresses a domain-specific problem in software development and algorithm analysis by improving prediction accuracy for code complexity, representing an incremental advance over existing methods.

The paper tackles the problem of predicting code time complexity by proposing MEC$^3$O, a multi-expert consensus system that assigns LLMs to specific complexity classes and uses structured debates with weighted consensus, achieving at least 10% higher accuracy and macro-F1 scores than open-source baselines on the CodeComplex dataset.

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.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes