NC2C: Automated Convexification of Generic Non-Convex Optimization Problems

Xinyue Peng, Yanming Liu, Yihan Cang, Yuwei Zhang, Xinyi Wang, Songhang Deng, Jiannan CaoarXiv 2026

TL;DR

NC2C is an end-to-end automated framework that leverages Large Language Models (LLMs) to transform complex, traditionally intractable non-convex optimization problems into solvable convex forms. By combining autonomous non-convex component detection, symbolic transformation strategies, and iterative feasibility corrections, NC2C achieves a 76% success rate on generic non-convex problems, significantly reducing the historical reliance on human optimization experts.

What Problem Does This Paper Address?

Optimization problems are foundational to machine learning, engineering design, and scientific computing. When a problem is convex, it is well-behaved and easily solved using standard commercial software. However, many real-world challenges are inherently non-convex—meaning they are plagued by multiple local optima, complex nonlinear constraints, and coupled variables.

Traditionally, converting a non-convex problem into a solvable convex equivalent (a process called convexification) is an art form. It requires deep mathematical expertise to manually perform algebraic manipulations, relaxations, and approximations. While recent research has used LLMs to generate code for standard optimization solvers (like Gurobi or CVXPY), these solvers still fail when handed raw, non-convex formulations. NC2C bridges this gap by automating the mathematical heavy lifting of convexification before passing the problem to a solver.

Methods

NC2C operates as an end-to-end pipeline that handles everything from natural language problem descriptions to verified numerical solutions.

Figure 1: Overview of the NC2C framework, which leverages LLMs to automatically transform generic non-convex optimization problems into convex forms.

The core architecture consists of the following stages:

  1. Problem Formulation: Uses Named Entity Recognition (NER) to parse natural language descriptions into formal mathematical objectives and constraints.
  2. Non-Convex Detection & Convexification: Systematically scans the mathematical model for non-convex terms (e.g., bilinear products, ratio constraints, binary variables). It then selects an appropriate strategy—such as Successive Convex Approximation (SCA) via Taylor expansion or Semidefinite Relaxation (SDR)—to transform the problem into a convex equivalent.
  3. Code Generation & Execution: Translates the convexified model into executable Python code using specialized solvers (CVXPY, Gurobi, or SciPy).
  4. Error Correction Loop (ECL): If the generated code fails to execute due to syntax or dimension mismatches, an iterative feedback loop analyzes the error report and self-corrects the code.
  5. Feasibility Domain Correction (FDC): Because convexification can relax constraints and yield solutions that violate the original problem's boundaries, NC2C validates the solution. If it's infeasible, the FDC dynamically adjusts initial values or tries alternative re-convexification strategies.

Datasets

The authors evaluated NC2C across four distinct datasets containing non-convex problems:

  • NL4Opt: A cleaned subset of 214 instances containing well-formed non-convex optimization problems derived from the original linear/mixed-integer programming competition dataset.
  • NLP4LP: 178 instances featuring verbose natural language descriptions and complex constraint structures.
  • ComplexOR: 18 highly challenging operations research scenarios involving combinatorial and non-convex optimization tasks.
  • WireOpt (NC2C Dataset): A curated dataset of 100 instances extracted from authoritative textbooks, research papers, and optimization libraries spanning engineering design and scientific computing.

Key Insights and Ideas

  • Convexification is Mandatory: Ablation studies revealed that simply throwing an LLM at a non-convex problem without explicit convexification causes success rates to plummet (from ~94% down to 15%). LLMs cannot simply "brute force" non-convex math through code generation; structural transformation is required.
  • Execution $\neq$ Success: Code that runs successfully doesn't mean the math is right. Without the Feasibility Domain Correction (FDC) mechanism, the LLM often generates mathematically valid code that converges to a solution violating the original non-convex constraints. FDC acts as a vital guardrail.
  • Efficiency via Pipeline Design: Surprisingly, adding multiple reasoning steps (detection, transformation, correction) actually decreases overall running time compared to other complex agent frameworks like OptiMUS. By structuring the task into clear mathematical phases, the LLM avoids getting bogged down in long, unstructured reasoning loops.

Key Results

  • Superior Success Rates: Using GPT-5.1 as the backbone, NC2C achieved a 94.5% success rate on NL4Opt and 72.2% on the highly complex ComplexOR dataset, significantly outperforming the next best baseline, OptiMUS (which scored 90.2% and 63.9% respectively).
  • Robustness Across Models: The framework generalized well to open-source models; when paired with Qwen3-235B-A22B, NC2C still achieved a 91.2% success rate on NL4Opt.
  • Faster Execution Time: NC2C demonstrated excellent computational efficiency, averaging 22.5 seconds per problem (with GPT-5.1), making it roughly 21% faster than OptiMUS and 16% faster than Reflexion.
Figure 2: Impact of omitting key components of the NC2C framework on success and execution rates across GPT-5.1 and Qwen3-235B-A22B.

Limitations and Future Work

  • LLM Dependency: The framework's success is tightly coupled with the underlying LLM's baseline mathematical reasoning capabilities. It can still struggle with highly specialized domain terminology or fundamental mathematical errors during the symbolic derivation phase.
  • Quantifying Suboptimality: The convexification process relies on approximations and relaxations. While NC2C ensures the final solution is feasible, the exact mathematical gap between the automated convex solution and the true global optimum of the original non-convex problem is not always quantifiable.
  • Future Directions: The authors suggest integrating reinforcement learning and online learning to help the framework dynamically adapt to real-time feedback in dynamic environments, as well as incorporating information retrieval to handle noisy or uncertain practical applications.

Summary updated

BibTeX
@misc{peng2026nc,
  author = {Xinyue Peng and Yanming Liu and Yihan Cang and Yuwei Zhang and Xinyi Wang and Songhang Deng and Jiannan Cao},
  title = {{NC2C: Automated Convexification of Generic Non-Convex Optimization Problems}},
  year = {2026},
  eprint = {2601.04789},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.04789},
}
Figure