Ensemble Methodology for Reference-Free Confidence Estimation in LLM-based Code Summarization

Marco Colombo, Balaji A Jayaram, Sowmyakumari Selvaraj, Sumit Tokkar, Animesh Kumar, Aravinda Prasad Sistla, Ravishankar Shetty, Rigel GjomemoarXiv 2026

TL;DR

This paper introduces a robust, reference-free framework for estimating the confidence of LLM-generated summaries for legacy COBOL code. By combining inter-model agreement (LLM-as-judge), token-level perplexity, and automated code coverage analysis, the system can automatically triage documentation, identifying high-quality summaries for auto-deployment while flagging uncertain or incomplete ones for human expert review.

What Problem Does This Paper Address?

The world runs on billions of lines of COBOL, yet the original developers are retiring, and documentation is often non-existent. While Large Language Models (LLMs) are excellent at generating summaries for this legacy code, evaluating their accuracy is a "chicken and egg" problem: traditional metrics like BLEU or ROUGE require a human-authored "ground truth" reference to compare against. In legacy enterprise environments, those references simply don't exist.

The authors address the challenge of reference-free evaluation. How can we trust an AI's explanation of a mission-critical financial paragraph if we don't have a manual baseline to verify it?

Methods

The authors propose a multi-metric ensemble framework that doesn't just look at one signal, but three distinct "pillars" of confidence:

  1. Inter-model Agreement (LLM-as-judge): The system generates summaries using three different models (e.g., LLaMA 3.3-70B, Grok-3, and an Infosys-tuned OpenAI model). A dedicated "judge" model then performs pairwise comparisons. If multiple independent models agree on the logic, the summary is likely correct.
  2. Token-Level Confidence (Perplexity): The system extracts the log-probabilities of the generated tokens. High perplexity (Figure 2) indicates the model was "surprised" or uncertain during generation, which often correlates with subtle semantic errors even if the text looks fluent.
  3. Code Coverage (G-Eval): Using a technique called G-Eval, an LLM acts as a reviewer to check if the summary actually accounts for all significant logic (e.g., conditional branches, I/O operations). This catches "omission errors" where a model provides a consistent but incomplete summary.
Figure 1: Overview of the ensemble-based confidence estima- tion pipeline. A COBOL code chunk and its dependencies are summarised by three models (Infosys, LLaMA 3.370B, Grok3). Pairwise comparisons with an LLM-as-judge yield structured scores, which are then aggregated into a final con- fidence estimate.

The final confidence score is calculated using a calibrated aggregation rule. It uses "linear pooling" for supportive evidence but applies a "conjunctive penalty"—meaning it significantly slashes the score only if multiple models corroborate a contradiction.

Datasets

The researchers evaluated their framework using the AWS CardDemo repository, an open-source COBOL codebase representing a credit card management system.

  • Sample Size: 100 representative COBOL code chunks (paragraphs/sections).
  • Ground Truth: To validate the framework's performance, domain experts with 15+ years of mainframe experience manually authored reference summaries to compare against the system's automated confidence scores.

Key Insights and Ideas

  • Agreement as a Proxy for Truth: The core intuition is that while one model might hallucinate, it is statistically unlikely for three diverse models to hallucinate the exact same incorrect business logic.
  • The "Silent Killer" of Omissions: A summary can be perfectly accurate regarding what it does say, but dangerous if it misses a critical "ELSE" branch. The G-Eval coverage metric (Figure 3) acts as a multiplicative penalty to catch these gaps.
  • Triage over Replacement: The goal isn't to eliminate humans, but to automate the "easy" 60% of documentation so that expensive human experts can focus their limited time on the 40% of code where the AI is actually struggling.
Figure 3: Coverage assessment via G-Eval. The (chunk, sum- mary) pair is scored 𝑘times (𝜏> 0) on a 1–5 rubric; scores are averaged and rescaled to [2, 10] (Equation (4)), then applied as multiplicative penalty to base confidence (Equation (5)).

Key Results

The framework demonstrated high reliability in "triaging" AI output:

  • High Precision: For summaries marked as "High Confidence" (Score $\geq$ 7.0), 94% were validated by human experts as acceptable for operational use.
  • Effective Triage: The system successfully identified 100% of the "problematic" low-confidence cases.
  • Efficiency Gains: By using this method, organizations could auto-deploy 57% of documentation without manual intervention, reducing the human review burden by more than half while maintaining high quality.
Evaluation results on AWS CardDemo COBOL code chunks

Limitations and Future Work

The authors acknowledge a few key hurdles:

  • Correlated Errors: If all models are trained on the same underlying data, they might share the same "blind spots." If every model is wrong in the same way, the agreement metric will fail.
  • Domain-Specific Jargon: The system occasionally flagged high-quality summaries as "low confidence" simply because they used rare, mainframe-specific terminology (like TPF-specific constructs) that increased perplexity.
  • Future Directions: The authors suggest rotating "anchor" models to avoid bias and integrating static analysis facts (like call graphs) directly into the prompts to further reduce "granularity drift" between different model outputs.

Summary updated

Abstract

This paper describes an approach and use case to estimate the correctness of LLM-generated COBOL summaries without access to human-authored references. The core intuition is that inter-model agreement on semantics is informative about truth, and that an LLM-as-judge can provide higher-fidelity pairwise assessments than traditional string- or embedding-based metrics. We operationalise this intuition with (i) controlled summary generation from diverse models; (ii) a LLM evaluator that compares pairs of summaries and emits structured judgments; and (iii) a calibrated aggregation rule that combines supportive evidence while penalising only corroborated contradictions.
BibTeX
@misc{colombo2026ensemble,
  author = {Marco Colombo and Balaji A Jayaram and Sowmyakumari Selvaraj and Sumit Tokkar and Animesh Kumar and Aravinda Prasad Sistla and Ravishankar Shetty and Rigel Gjomemo},
  title = {{Ensemble Methodology for Reference-Free Confidence Estimation in LLM-based Code Summarization}},
  year = {2026},
  eprint = {2611.09846},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.09846},
}
Figure