acceptodds
Under review as a conference paper at ICLR 2027

Synthesizing Local Control Barrier Functions for Hybrid Systems with LLM-Assisted search

Abstract

A control barrier function (CBF) certifies that a controller can keep a system within a set of safe states. Manually constructing a CBF for a given system often requires intuition about the function's structure and parameters and is challenging in general. For hybrid systems with mode switching, a single barrier for all modes may be overly conservative. Using per-mode local barriers can reduce this conservatism, but they introduce an additional constraint that at every mode switch, a safe state must remain safe in the next mode. We propose a framework to synthesize per-mode local CBFs satisfying the mode-switching safety constraint. In our framework, a large language model proposes and refines candidate barriers based on feedback from a satisfiability solver checking the conditions for certification. We present case studies in which the framework successfully synthesizes per-mode CBFs. In each case study, the solver proves that the synthesized functions satisfy both the CBF conditions for each mode and the safety constraint at every mode switch. The proposed framework succeeds even when a naively-prompted baseline without solver feedback fails to produce any certified CBFs.

Primary area:
applications to robotics, autonomy, planning
Keywords:
Automated control barrier function discovery, Evolutionary computation, Large language models

Reviews

Among:
Shape:
1234this paper, Top 30%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.67 over 3 reviews, above 70% of the others.
Reviewer_Er4jOpenReview ↗
Rating
2
Confidence
3
Informativeness
1
Presentation
2
Soundness
2
Read review
Paper summary

This paper proposes an automatic LLM-based framework for synthesizing local control barrier functions (CBFs) for hybrid systems. The LLM guides the candidate generation and refinement. The proposed approach is evaluated in two case studies, demonstrating its ability to synthesize local CBFs.

Critical strengths
  • The main contribution (a framework for synthesizing CBFs automatically) sounds relevant and indeed seems novel.
  • 6 successful runs out of 9, compared to 0 by the naive baseline, which shows the effectiveness of the method.
Critical weaknesses
  • This is a paper of type "use generative AI as an oracle for problem X." I am generally reserved regarding such papers. By default, I expect that this works quite well in many cases. I was not convinced that any challenge was faced or any clever tool was needed, nor that there are any deeper insights from the general approach.
  • The paper only compares to a "naive baseline" (378). I do not think this is sufficient to argue that the proposed approach is the right one. I accept that paper addresses an unsolved problem, so no established baseline may exist. Still, I would expect that the authors could also make comparative experiments in simplified settings that other tools can deal with.
  • The paper lacks a systematic analysis or discussion of the synthesized CBFs, limiting the possible conclusions drawn about the proposed method.
Questions for authors
  • Could the authors compare their approach with at least one other established baseline to investigate its positioning?
  • Could the authors provide a systematic evaluation of the quality and properties of the certificates generated by the LLM, e.g., the control performance?
3 comments
AuthorsOpenReview ↗

Response to Reviewer Er4j

Thank you very much for reviewing our paper and for your constructive comments. Our General Response reports the experiments we added.

First, we answer the two questions.

Q1.

Could the authors compare their approach with at least one other established baseline to investigate its positioning?

For the two hybrid tasks, we ran a baseline with the LLM replaced by a fixed polynomial template; please see Point (1) of our General Response. For non-hybrid settings, Appendix C compares the proposed method with that of BarrierBench (Taheri et al., 2026) on its 86 continuous-time problems.

Q2.

Could the authors provide a systematic evaluation of the quality and properties of the certificates generated by the LLM, e.g., the control performance?

Appendix D.3 shows, for the reported design of every certified run in the Rover task, the safe-set fraction, goal reaching, arrival time, and clearance over 32 trajectories. Appendix D.4 shows the trajectories in the ACC task at three gains. In the revised version, we have added a table of all certified designs, with their degrees and numbers of monomials; please see Point (4) of our General Response and Appendix E.4 for details.


Let us also comment on the point raised as a weakness.

This is a paper of type "use generative AI as an oracle for problem X."

Although we understand the reviewer's view, we respectfully disagree. We do not think that the task of finding CBFs can be solved merely by using an LLM as an oracle. In fact, as one of the baselines, we repeatedly queried the same LLM with the prompt used in the first iteration of our method, with the same fitter and solver but without the search mechanism; this produced no certificates in 540 proposals for the Rover task. LLMs indeed play an important role in writing function forms of barriers, but the other components of the framework are also indispensable: the fitter tunes the coefficients, a design is accepted only when the solver proves every condition (including safety at each mode switch), and the search mechanism is key to trying different possibilities beyond what LLMs alone can suggest.

Thank you for adding the new results.

Regarding the new baseline, I understand that Reviewer qfYB suggested to look at fixed templates. In my opinion, using an established tool is preferred to demonstrate the advances. Reviewer 6pTw suggested an SOS baseline for instance. (I saw your reply that you expect that SOS will work better for these systems.)

Regarding my weakness 1: I understand that simply letting the LLM solve the end-to-end problem is not going to work. My point was that there are many well-known algorithmic schemes that consist of a refinement loop with an oracle. I am not saying that this type of work should not be done, but I consider it relatively low-hanging in the technical contribution.

AuthorsOpenReview ↗

Response to the Follow-up Comment of Reviewer Er4j

Thank you very much for the follow-up comment.

In my opinion, using an established tool is preferred to demonstrate the advances.

We agree that a comparison with an established tool is important. Currently our comparison with existing methods is limited to single-mode settings as most of them are for single-mode systems.

I consider it relatively low-hanging in the technical contribution.

We understand the reviewer's take. That said, we believe that using LLMs as synthesis oracles is still worth studying as LLMs are so flexible, and how to use them as oracles in search is not necessarily trivial. As a promising future direction, we can also consider giving LLMs not only formal specifications but also domain knowledge from users.

Thank you again for the fruitful discussion!

Reviewer_qfYBOpenReview ↗
Rating
3(+1)
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper targets hybrid systems that switch between modes, such as a car moving from a dry road to an icy road. It synthesizes one local control barrier function (CBF) per mode, plus a check that a state safe before a switch stays safe after it. An LLM proposes the symbolic form of each barrier. A numerical optimizer fits the coefficients. An SMT solver (dReal) proves the safety conditions. An evolutionary loop, adapted from MLES, uses the solver’s results to guide the next proposals. On a two-terrain rover task, 6 of 9 runs produce a certified design, versus 0 of 9 for naive prompting. On an adaptive cruise control task, a single run finds a certificate. The appendix also reports 83 of 100 problems certified on BarrierBench under a relaxed setting.

Critical strengths
  1. The problem is real and the idea is useful. Yang et al. assume local CBFs are given in advance. This paper automates their synthesis and provides a solver-checked certificate covering both within-mode conditions and safety at mode switches. The rover example without the switch check (Figure 3b) clearly shows why this check matters.

  2. The method carefully distinguishes a proof from an approximate result. A design is accepted only when the solver proves every condition; conditions that merely hold within tolerance do not count as proved. The appendix provides prompt examples, operator templates, and details of a successful search, making the procedure easier to inspect.

Critical weaknesses
  1. The experiments do not establish the added value of using an LLM. The hybrid-system evaluation covers only two low-dimensional systems, both with two modes. The cruise control task has only one run and finds its first certificate at iteration 2. The naive-prompting baseline still uses an LLM, so it does not address whether a simpler search method would suffice. The reported rover barriers are quadratic polynomials. A fixed quadratic template with the same optimizer and solver might also succeed. Without a non-LLM baseline, I cannot tell how much the LLM contributes. This is the main reason for my rating.

  2. The claimed contributions are not sufficiently isolated. The paper identifies verifier-status ranking as a key difference from MLES, but does not ablate it. The naive-prompting comparison removes counterexample feedback to the LLM, parent designs, and the structure ledger together, so their individual contributions remain unclear. The claimed control-performance benefit of local barriers on ACC also depends on the gain: Appendix D.4 shows that reusing the ice barrier in both modes reaches the target sooner at the certified gain. This does not negate the certification benefit of the local barriers, since the shared barrier fails to cover the initial set, but it limits the performance conclusion drawn from Figure 5.

Questions for authors

Requests for additional evidence:

  1. Could the authors compare against fixed polynomial templates, such as degree 2 and 4, using the same optimizer, solver, certification conditions, and a comparable computational budget on both hybrid tasks?

  2. Could the authors ablate verifier-status ranking by replacing it with a numerical fitness score while keeping the rest of the framework unchanged?

  3. Could the ACC experiment be repeated over several seeds, with runtime and token usage reported per run?

Suggestion for future work:

Evaluation on higher-dimensional systems or systems with three or more modes would help assess scalability.

2 comments
AuthorsOpenReview ↗

Response to Reviewer qfYB

Thank you very much for reviewing our paper and for your constructive comments. Our General Response reports the experiments we added.

First, we answer the three questions.

Q1.

Could the authors compare against fixed polynomial templates, such as degree 2 and 4, using the same optimizer, solver, certification conditions, and a comparable computational budget on both hybrid tasks?

We ran this comparison on both tasks, with the same fitter, solver, and certified conditions, at degrees 2 and 4. A degree-2 template reached a certificate on both tasks. A degree-4 template did not reach a certificate in our runs; we stopped them after several hours because the solver timed out on the invariance conditions at almost every call. Please see Point (1) of our General Response and Appendix E.1.

Q2.

Could the authors ablate verifier-status ranking by replacing it with a numerical fitness score while keeping the rest of the framework unchanged?

We conducted such an ablation with a scalar fitness based on that of Verdier and Mazo (2018), with everything else unchanged. The two rankings performed similarly: both obtained certificates in the same number of runs, although not on exactly the same seeds. Please see Point (2) of our General Response for details.

Q3.

Could the ACC experiment be repeated over several seeds, with runtime and token usage reported per run?

We added four runs with different seeds. Across the five runs, the first certificate comes at iteration 2 (original run) and 8, 4, 0, and 12 (new runs), out of 50 iterations per run. A run takes 2.8 to 3.1 hours and generates 243k to 324k output tokens. Please see Point (3) of our General Response and the added Appendix E.3 for details.


Let us also comment on the point raised as a weakness.

The claimed control-performance benefit of local barriers on ACC also depends on the gain

We agree. The comparison in Figure 5 holds at the gain shown there, and Appendix D.4 gives the results at the other gains. The certification result of Section 4, however, does not depend on the gain. If hiceh_{\mathrm{ice}} is used in both modes, the initial set does not lie in CiceC_{\mathrm{ice}}, so this single barrier does not certify the specification.

Thank you for the additional experiments. The response addresses several of my concerns. I think using LLMs to reduce manual template design is a valuable direction, and the larger safe sets are encouraging.

However, I also agree with Reviewer 6pTw that an SOS-based synthesis comparison would be useful, although speed is not the main goal and existing tools may require adaptation for mode switching. I think these points do not fully explain why this comparison was omitted in the current polynomial examples. The effectiveness and computational cost on more complex systems also remain unclear.

Overall, the additional evidence has addressed several of my initial concerns, and I am raising my rating.

Reviewer_6pTwOpenReview ↗
Rating
3(+1)
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper proposes a method to synthesize local CBFs for hybrid (switching systems) where the local CBFs must overlap on states where the mode causes a switch. The approach uses the CEGIS-style framework of learner and verifier, with the learner being upgraded to an LLM-guided approach, and SMT solvers (dReal) being used as the verifier. I believe the paper is technically correct, but the ideas can be considered incremental, swapping an LLM into the CEGIS approach of FOSSIL, for hybrid system certificates that are non-trivial but have been previously defined in the literature.

Critical strengths
  • The paper presents concepts clearly, and figure 2 is intuitive to follow, increasing the possibility of reproducing the method
  • The approach includes the important detail of safety at switches, which other works have omitted or assumed
  • The work has also considered and by their setup excluded undesirable pathological switching cases
  • The method is compared against a naive prompting approach, showing that the setup in this paper does enable solutions to be found while naive prompting alone would not.
Critical weaknesses
  • While the switching modes adds complexity, the work feels fairly incremental when compared with existing CEGIS approaches like FOSSIL. I understand instead of training that symbolic expressions are being directly derived, but it is in the main a swap from classical NN to modern LLM in the learner. The main novelty of the CBF is in the safe switching, but such ideas can be traced back as far as 2004 (without control):

Prajna, S., Jadbabaie, A. (2004). Safety Verification of Hybrid Systems Using Barrier Certificates. In: Alur, R., Pappas, G.J. (eds) Hybrid Systems: Computation and Control. HSCC 2004. Lecture Notes in Computer Science, vol 2993. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24743-2_32

  • I think the two case studies chosen to evaluate the method are weak. While they are switching systems, the dynamics of both are linear (4d) and polynomial (3d). In this case I believe there should be a comparison with the classical sum-of-squares approaches which may find the CBFs significantly quicker (the bilinearity is mild only in the invariance condition). E.g. the PRoTECT tool (not for switching modes) compared itself against FOSSIL and FOSSIL was significantly slower for the 1d-4d systems. I think an equivalent comparison with SOS methods is needed.

[Table 1] B. Wooding, V. Horbanov, and A. Lavaei. "PRoTECT: Parallel Construction of Barrier Certificates for Safety Verification of Polynomial Systems." ICCPS. 2025. doi:10.48550/arXiv.2404.14804

  • Similarly, I think the experiments could be more transparent about the solve times required. Rover had 6/9 runs produce a certificate so 3 produce no certificate in 60 outer loops iterations. How long did each iteration take to compute? How many tokens are used?

Minor Comments/Typos:

  • the acronym MLES should be expanded.
  • CEGIS is attributed to Dawson et al., but I believe Abate's papers may be a more appropriate reference
Questions for authors
  1. Is the approach template free? Or does the LLM consider a library of certificate architectures it uses? Is there restrictions based on the dReal solver as to which nonlinear activation functions can be considered?
  2. With the fitter selecting a symbolic expression to be evaluated by the SMT solver, can the LLM use any notion of score to improve its selection in the presence of counterexamples? For FOSSIL, the objective function score can be used to guide the retraining of the NN, but in this paper it seems unclear if it is possible to "improve" even locally in the same way. Essentially each attempt is an independent guess rather than conditional on the previous fit?
  3. What was the time taken for each experiments to find a certificate/timeout? token usage? etc.
  4. How far can the approach be scaled? CEGIS is often argued to scale better than SOS, does the same apply for this approach?
1 comment
AuthorsOpenReview ↗

Response to Reviewer 6pTw

Thank you very much for reviewing our paper and for your constructive comments. Our General Response reports the experiments we added.

First, we answer the four questions.

Q1.

Is the approach template free? Or does the LLM consider a library of certificate architectures it uses? Is there restrictions based on the dReal solver as to which nonlinear activation functions can be considered?

The proposed method has no library of certificate architectures. An LLM writes the symbolic expression of each barrier, with named free parameters, and the fitter sets the parameters. The expression can contain the nonlinear functions supported by dReal: sin, cos, tan, exp, log, and sqrt. The prompt asks for polynomial terms where possible, while forbidding nesting exp, log, sqrt, and tan or multiplying them by further polynomials. Empirically, all certificates in the two case studies were polynomials.

Q2.

With the fitter selecting a symbolic expression to be evaluated by the SMT solver, can the LLM use any notion of score to improve its selection in the presence of counterexamples? For FOSSIL, the objective function score can be used to guide the retraining of the NN, but in this paper it seems unclear if it is possible to "improve" even locally in the same way. Essentially each attempt is an independent guess rather than conditional on the previous fit?

Each attempt is conditioned on previous ones in two ways. When the form of a design is fixed, the fitter adds the counterexamples dReal returns to its sample set and refits the coefficients, with up to seven solver calls per design; this can be understood as a counterpart to the network retraining in FOSSIL. When a new form is written, the evolutionary operators receive the parent's form and the conditions it violates. If the parent is not yet certified, the two modification operators, M1 and M2, also receive the counterexample points and the size of each violation. Parents are drawn by rank, and the rank is determined first by the solver's verdicts. In Point (2) of our General Response, we compare this with a scalar fitness. The parameters of a new form start from the values the LLM writes.

Q3.

What was the time taken for each experiments to find a certificate/timeout? token usage? etc.

Appendix E.3 lists, for every run, the total time, the time to the first certificate, the number of LLM calls, the tokens generated, and the number of solver calls. For the Rover task, the first certificate comes after 2.8 to 6.4 hours in the six certified runs. An iteration typically takes 5 to 7 minutes and at most 24 minutes, and a run generates 171k to 293k output tokens. The three runs that produced no certificates ran for 5.4 to 6.6 hours.

Q4.

How far can the approach be scaled? CEGIS is often argued to scale better than SOS, does the same apply for this approach?

As an initial step in developing this kind of framework for hybrid systems, the current work focused on low-dimensional systems and did not conduct larger-scale experiments. Investigating how the method can scale is indeed an important future direction. As noted by Abate et al. (2021a), the verification engine (SMT verifier) would be one of the bottlenecks for larger-scale problems.


Let us also comment on the points raised as weaknesses.

The main novelty of the CBF is in the safe switching, but such ideas can be traced back as far as 2004 (without control)

The condition at a switch indeed follows the one used by Prajna and Jadbabaie (2004), although they used it for barrier certificates without control inputs. In the revised version, we have cited the 2004 paper next to Prajna et al. (2007) and reworded the introduction so that the novelty claim covers what we synthesize, i.e., local control barrier functions under input constraints.

I think an equivalent comparison with SOS methods is needed.

The obtained barriers are polynomial in both case studies, so we expect SOS programming to certify them faster than our loop. However, we would argue that speed is not a main target of our study. We ran searches with fixed polynomial templates, using the same fitter and dReal, to measure what the LLM contributes; please see Point (1) of our General Response.

Comments on the paper

1 comment
AuthorsOpenReview ↗

General Response

In the revised PDF, the changes are shown in blue.

(1) Fixed-template baseline

Given the suggestions by the reviewers, we additionally conducted a comparison with a no-LLM baseline. We replaced the LLM proposer of the method by a fixed polynomial template: a polynomial of a fixed degree containing every monomial up to that degree, with all coefficients fitted. The fitter, the solver (dReal), and the certified conditions are the same as in the proposed method. Each baseline run uses one seed and stops at its first certificate. The proposed method runs to its budget and reports one design.

TaskMethodCertified runsSolver calls to first certificateTime to first certificateSafe-set fraction, vol(safe set) / vol(state space)
Rovertemplate, degree 23 of 322, 4, 339, 8, 5 min0.53, 0.60, 0.60
Rovertemplate, degree 40 of 3———
Roverproposed (LLM)6 of 994–2422.8–6.4 h0.63–0.76
ACCtemplate, degree 22 of 324, 2337, 37 min0.46, 0.51
ACCtemplate, degree 33 of 344, 15, 15104, 39, 36 min0.50, 0.51, 0.55
ACCtemplate, degree 40 of 3———
ACCproposed (LLM)5 of 52–564–97 min0.60–0.72

In both case studies, searches with the fixed template of degree-2 polynomials reached certificates. However, the template of degree-4 polynomials did not reach a certificate on either system, and the solver timed out on the invariance conditions at almost every call. This observation shows that a search without an LLM can also obtain certificates, if a template is properly tuned. Meanwhile, the proposed method can choose function forms without manual intervention. Moreover, the proposed method returns designs with a larger safe set (i.e., a larger safe-set fraction) on both systems; in fact, its first certificate already had a larger safe set than any template certificate did. We have added these new results as Appendix E.1.

(2) Ablation on ranking scheme

Our method ranks the designs lexicographically by several criteria based on the solver's verdicts, i.e., a design with fewer violated or undecided conditions ranks higher. To further analyze this scheme, we instead ranked the population by a scalar fitness. We used a scalar fitness based on that of Verdier and Mazo (2018, Eq. (11)). It also scores each condition by the solver's verdict (as ours does) and by the violation on the samples but adds up the scores instead of ordering them lexicographically.

Verifier-status ranking (proposed)Scalar fitness
Runs with a certificate6 of 96 of 9
Iteration of the first certificate (of 60)22–4916–52
Trajectories that reach the goal187 / 192192 / 192
Safe-set fraction of the reported design0.63–0.760.62–0.73

The results do not clearly show an advantage (or a disadvantage) of our ranking scheme. Although we believe our scheme admits more generality, we have modified the relevant explanations in the paper in light of these results.

(3) Runtime and tokens

A run of the proposed method (the Rover task; 60 iterations) takes 5.4 to 7.5 hours, generates 171k to 293k output tokens, and makes 220 to 293 solver calls; one iteration typically takes 5 to 7 minutes. A run (the ACC task; 50 iterations) takes 2.8 to 3.1 hours, generates 243k to 324k output tokens, and makes 97 to 140 solver calls. Appendix E.3 lists every run, with its time to the first certificate. All runs used one 16-core machine, and the solver and fitter time limits are CPU-time limits.

(4) Analysis of the certificates

Appendix D.3 tabulates, for the reported design of every certified run for the Rover task, the safe-set fraction, goal reaching, arrival time, and clearance. We have added a table of all certified designs (all of which are polynomials) in Appendix E.4. The LLMs chose various forms on each system: on Rover, degree 2 to 4 with 11 to 17 monomials per mode; on ACC, degree 2 to 7 with 5 to 26 monomials per mode.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.