CombEval: A Framework for Evaluating Combinatorial Counting in Large Language Models

arXiv:2606.19788 · cs.AI, cs.CL · Submitted 2026-06-18 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: Today's paper: "CombEval: A Framework for Evaluating Combinatorial Counting in Large Language Models".

Jane: CombEval introduces a dynamic benchmark framework designed to rigorously evaluate the combinatorial counting capabilities of large language models (LLMs).

Tom: First, who's behind it and why it matters.

Title and authors: Tom: So, what are the main authors behind this paper, Jane? I see a team from Jilin University and Czech Technical University in Prague involved here.

Jane: The paper lists Yuxu Zhou, Ondrej Kuželka, Yuyi Wang, Yuanhong Wang, and Yi Chang as the key contributors. They seem to bring together different expertise for this project.

Lu: I think their background suggests a strong foundation in both formal AI theory and practical engineering implementation for these types of problems.

Meng: I'm curious about how they structured the team to handle both the theoretical modeling aspect and the practical generation pipeline described in the paper.

Lalam: Having people with that mix of deep research and engineering focus is what makes this framework credible, because you need solid tools to build something like CombEval.

Tom: Exactly; it shows that this isn't just a conceptual idea floating around, but a structured effort to build a rigorous testing tool. This paper lays out the foundation for how we can properly benchmark models on counting tasks.

The paper's summary: Jane: So, the main summary of CombEval is that it represents each problem as a typed Cofola specification, which covers entities, combinatorial objects, object dependencies, and constraints.

Tom: That formal structure is what lets them generate natural-language counting problems while ensuring those answers are verified exactly by a solver. That's the central mechanism we need to understand.

Lu: The paper emphasizes that this dynamic benchmark allows for systematic variation across different object types, entity scales, constraint counts, and reasoning depth.

Meng: So they aren't just testing one type of counting problem; they can dial up the complexity by changing those specific parameters systematically.

Lalam: It means we can pinpoint precisely which aspects of combinatorial reasoning are causing models to fail, like issues with ordered objects or nested dependencies that are hard to catch otherwise.

Tom: Right, so instead of just seeing a model score, we get a clear diagnostic testbed that tells us *why* it failed on a specific structural challenge.

The paper's improvements: Jane: Looking at the suggested improvements in CombEval, they focus on making the generation pipeline more robust and ensuring that models learn to handle specific weaknesses identified during evaluation.

Tom: They suggest using a closed-loop verification pipeline where they rewrite natural language prompts and then use the solver to verify the exact Cofola structure before evaluation.

Lu: That approach of verifying against a formal program ensures we're testing the model's reasoning capability, not just its ability to mimic superficial phrasing.

Meng: I see that they also focus on making code-augmented reasoning better, specifically by fine-tuning models to generate correct Python code for these complex counting problems.

Lalam: It’s really important that they address those specific failure modes we saw—like ordering or indistinguishable elements—so the improvements target the exact cognitive blind spots of current AI.

Tom: So, it’s about moving beyond just seeing if a model can get the answer, to understanding precisely how it arrives at that answer when things get structurally complex.

Conclusion: Jane: To wrap up, CombEval provides a dynamic framework for creating and verifying combinatorial counting problems using formal specifications. It systematically controls difficulty through entity size and constraint count, which lets researchers test models in a highly structured way.

Tom: The main implication is that we can finally diagnose *why* LLMs struggle with counting—whether it’s the ordering or the deep nesting of dependencies—giving us concrete data for improvement.

Lu: For me, I see huge potential here because it opens up new avenues for testing how AI handles tasks that require precise mathematical structure, which is something we need to explore further in complex reasoning.

Meng: From a practical standpoint, this framework gives us a way to stress-test models on the exact types of structured logic needed for optimization problems in fields like logistics where enumeration matters.

Lalam: I think the most impactful vision here is using this systematic approach to build more robust AI systems that don't just guess, but can rigorously count and structure complex solutions when they matter most.

Tom: Fantastic summary, everyone; so CombEval is a powerful tool for making AI reasoning on counting problems much more transparent and reliable. Thanks for joining us today as we wrap up our discussion on this paper.

School of Artificial Intelligence, Jilin University · Czech Technical University in Prague

cs.AI, cs.CL

Submitted: 2026-06-18

Updated: 2026-09-30

Comments: Code: https://github.com/YuxuZhou-CN/combination-problem-generation

Code: https://github.com/YuxuZhou-CN/combination-problem-generation

License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/

Importance score: 83/100

The gist: CombEval introduces a dynamic benchmark framework designed to rigorously evaluate the combinatorial counting capabilities of large language models (LLMs).

Key concepts

Cofola
A typed declarative language and solver specifically built for combinatorial counting. It allows problems to be defined precisely using triples of domain, object types, and constraints. The solver converts these formal definitions into solvable mathematical instances, ensuring exact answers for complex counting tasks.
Dynamic Problem Generation Pipeline
A controlled process that automatically creates diverse counting problems. It starts by setting up a domain and then uses operators like 'choose' or 'sequence' to build complex structures (the object DAG). Constraints are then added systematically, allowing researchers to tune the problem's complexity in a predictable way.
Controllability of Difficulty
The framework allows for precise control over how hard a counting problem is. By manipulating variables like the size of the entity set, the number of constraints, or reasoning depth, researchers can predictably lower model accuracy to pinpoint exactly which structural complexity causes performance degradation.
Solver-Backed Verification
The benchmark uses the Cofola solver to verify that every generated problem has an exact answer. This filters out flawed instances and helps diagnose errors. Manual analysis of incorrect answers reveals specific logical mistakes made by the LLMs, such as misinterpreting constraints or missing mathematical quotients.

Terminology

Summary

CombEval introduces a dynamic benchmark framework designed to rigorously evaluate the combinatorial counting capabilities of large language models (LLMs). This framework addresses a critical gap in existing benchmarks by synthesizing complex, structured counting problems from a formal specification rather than relying on static question banks. By enabling systematic variation across object types, entity scales, and constraint counts, CombEval allows researchers to control the structural complexity of problems. This controlled environment is crucial for diagnosing precisely when and why LLMs fail at combinatorial reasoning—such as issues with ordered objects or nested dependencies—providing a diagnostic testbed for studying model limitations in this domain.

Formalization via Cofola

The core of CombEval is the use of Cofola, a typed declarative language and solver specifically designed for combinatorial counting. Each problem is formalized as a triple P = ⟨D, O, C⟩, where D is the finite entity domain, O is the set of combinatorial objects defined over D (e.g., sets or sequences), and C is the set of constraints over these objects. This formal structure allows for precise definition of object types (such as sets, bags, tuples, sequences) and constraints (like subset membership or relative order patterns). The Cofola solver compiles this formal specification into weighted first-order model counting (WFOMC) instances, which are solved efficiently to provide an exact answer verification for a wide range of combinatorial problems.

Dynamic Problem Generation Pipeline

CombEval generates problem instances through a typed object-DAG pipeline. This process involves several controlled steps:

  1. Initializing a finite entity domain with 'n' entities and sampling initial set or bag objects.

  2. Constructing a Cofola object DAG by repeatedly sampling type-compatible operators (like 'choose', 'sequence', or 'composition') to define combinatorial operations, controlled by maximum dependency depth 'd'.

  3. Sampling a set of constraints ('k' constraints) whose types match the selected objects, covering structural and cardinality constraints.

  4. Using a template-based method to convert the generated CO problem into natural language using templates associated with each Cofola object type, ensuring that every instance is grounded in a formal program and solved exactly before evaluation.

Systematic Evaluation of LLMs

CombEval is used to conduct systematic evaluations of 11 mainstream LLMs, including both open-source models (e.g., Qwen, DeepSeek) and closed-source models (e.g., GPT-5.5). The evaluation protocol is designed to test reasoning under two paradigms: standard natural language reasoning (zero-shot) and code-augmented reasoning, where models are prompted to return executable Python code for computation. Key observations from the experiments include that Model scale and advanced reasoning techniques lead to improved overall accuracy, but all models still show clear degradation on typed objects that require indistinguishable elements, ordered structures, or multi-step dependencies.

Controllability of Difficulty

A primary research question addressed by CombEval is the controllability of problem difficulty. The framework allows for fine-grained control over difficulty by systematically tuning structural variables:

  1. Increasing entity size ('n') expands the combinatorial search space.

  2. Increasing constraint count ('k') introduces more complex restrictions, which can predictably lower model accuracy.

  3. Increasing reasoning depth ('d') tests chain-structured reasoning, where performance degradation is monotonic as depth increases, demonstrating how deeper nesting exacerbates the risk of reasoning drift and error accumulation.

Robustness to Prompt Variations

The framework also investigates the impact of prompt templates on LLM performance. By comparing original problem formulations with solver-verified natural-language rewrites that preserve the exact Cofola structure (a closed-loop verification pipeline), researchers can isolate surface wording effects from underlying reasoning ability. The results indicate that surface template variations can cause some performance fluctuations, especially for less capable (but still strong) models, but stronger models, such as gpt-5.5, show greater robustness to these variations.

Solver-Backed Verification and Error Analysis

The benchmark relies on the Cofola solver for exact answer verification, filtering out instances with solver failures, unsupported features, or unstable answers. Furthermore, manual error analysis of incorrect answers reveals common failure modes that span both semantic gaps (e.g., misinterpreting together constraints) and classical combinatorial slips (e.g., missing factorial quotients for multiset circles). This diagnostic capability allows the framework to identify specific logical errors in LLMs' reasoning processes.

Limitations and Future Directions

While powerful, CombEval has limitations, including support only for English, computational constraints on solver runtime limiting the complexity of generated instances, and reliance on a subset of human validation. Future work plans include scaling the suites to additional object types (like graph objects) and exploring agentic techniques to enhance combinatorial reasoning performance. The code and generated benchmark suites are publicly available at the provided GitHub repository.

Improvements for AI systems

Here are specific improvements for AI systems based on the CombEval framework:

  1. Improve Combinatorial Reasoning Benchmarks: Develop and deploy a dynamic benchmark generator (CombEval) that creates complex, structured combinatorial counting problems from formal specifications (Cofola). This moves beyond static datasets by allowing systematic variation of entity scale, constraint count, object type (sets, sequences, tuples), and reasoning depth.

  2. Enhance Model Robustness to Structural Complexity: Train models to maintain high accuracy on combinatorial tasks even when faced with specific structural challenges identified in the error analysis:

  3. Address Specific Reasoning Weaknesses: Explicitly train or fine-tune models on types of failures identified by CombEval, such as:

  4. Handling Ordered and Positional Constraints (e.g., adjacency, relative ordering) in sequences and tuples without catastrophic failure, especially with indistinguishable elements (Error 1).

  5. Managing Nested Object Dependencies: Improve the ability of models to reason through complex object dependencies where one combinatorial structure is defined based on the result of another (depth-2 and deeper nesting failures).

  6. Mastering Constraint Interpretation: Enhance models' ability to correctly interpret and apply complex, multi-faceted constraints (e.g., simultaneously handling membership, cardinality, absolute position, and relative order) without logical errors (Error 5).

  7. Improving Code-Augmented Reasoning for CO: Fine-tune models specifically on the ability to generate correct Python code for combinatorial counting problems. This involves training them to decompose complex combinatorial logic into executable algorithmic steps rather than relying solely on pattern matching (RQ1, RQ2).

  8. Developing Prompt Robustness Strategies: Implement a closed-loop verification pipeline (Style Transfer -> Formal Back-translation -> Solver Verification) during model development/fine-tuning to ensure that models learn the underlying combinatorial structure rather than memorizing superficial prompt templates or linguistic variations (RQ3). This ensures reasoning is decoupled from surface wording.

  9. Creating Difficulty Control Mechanisms: Use the framework's parameterization (entity size, constraint count, depth) to create adaptive training regimes where models are progressively exposed to increasing structural complexity, ensuring they learn scalable counting principles rather than just solving small, simple instances.

This improved AI system will be significantly better at tackling real-world constraint-driven decision optimization problems in finance, logistics, and healthcare by accurately performing combinatorial enumeration and reasoning.

Sources

Related papers