\section{The \algname Algorithm} \label{sec:algorithm}

We start by introducing necessary notions from active learning for level-set estimation, followed by a detailed description of our proposed algorithm.


\subsection{Active learning for level-set estimation}
We follow the common practice and assume the objective and each unknown constraint is sampled from a corresponding independent Gaussian process (\GP) \citep{hernandez2015predictive, gelbart2014bayesian, gotovos2013active} to treat the epistemic uncertainty. 
\begin{align*}
\globalf &\sim \GP_\globalf  \\
    \cFunc_\conIdx &\sim \GP_{\cFunc_\conIdx} \textit{\quad} \forall \conIdx\in\conSpace
\end{align*}
We could derive pointwise confidence interval estimation with the \GP\xspace for each black-box function. We define the upper confidence bound 
$ \UCBit_{t}(\instance) \triangleq \mu_{t-1}(\instance) + \beta^{1/2}_{t}\sigma_{t-1}(\instance)$ 
and lower confidence bound $ \LCB_{t}(\instance) \triangleq\mu_{t-1}(\instance) - \beta^{1/2}_{t}\sigma_{t-1}(\instance)$, where $\sigma_{t-1}(\instance) = k_{t-1}(\instance,\instance)^{1/2}$ and $\beta_t$ acts as a scaling factor corresponding to certain confidence. 

For each unknown constraint $\cFunc_\conIdx$, we 
follow the notations from \citet{gotovos2013active} and define the superlevel-set to be the areas that meet the constraint $\cFunc_\conIdx$ with high confidence
\begin{equation*}
    S_{\cFunc_\conIdx, t}\defeq \{\instance\in\searchSpace\mid  \LCB_{\cFunc_\conIdx,t}(\instance) > 0 \}   
\end{equation*}

We define the sublevel-set to be the areas that do not meet the constraint $\cFunc_\conIdx$ with high confidence
\begin{equation*}
    L_{\cFunc_\conIdx, t}\defeq \{\instance\in\searchSpace\mid  \UCBit_{\cFunc_\conIdx,t}(\instance) < 0 \}   
\end{equation*}

and the undecided set is defined as
\begin{equation*}
U_{\cFunc_\conIdx, t}\defeq \{\instance\in\searchSpace\mid  \UCBit_{\cFunc_\conIdx,t}(\instance) \geq 0, \LCB_{\cFunc_\conIdx,t}(\instance) \leq 0\}
\end{equation*}
where the points remain to be classified. 

\subsection{Region of interest identification for efficient CBO} \label{sec:roi}
In the CBO setting, we only care about the superlevel-set $S_{\cFunc_\conIdx, t}$ and undecided-set $U_{\cFunc_\conIdx, t}$, where the global optimum is likely to lie in. Hence, we define the region of interest for each constraint function $\cFunc_\conIdx$ as 
\begin{equation*}
    \roi_{\cFunc_\conIdx, t} \defeq S_{\cFunc_\conIdx, t} \cup U_{\cFunc_\conIdx, t} = \{\instance\in\searchSpace\mid  \UCBit_{\cFunc_\conIdx,t}(\instance) \geq 0\}   
\end{equation*}

Similarly, for the objective function, though there is no pre-specified threshold, we could use the maximum of $\LCB_{\globalf}(\instance)$ on the intersection of superlevel-set $S_{\cFunc, t} \defeq \bigcap_{m}^{\conSpace} S_{\cFunc_\conIdx, t}$ 
\begin{equation*}
  \LCB_{\globalf,t, \max} \defeq 
    \begin{cases}
        \max_{\instance \in S_{\cFunc, t}} \LCB_{\globalf,t}(\instance), &\text{if } S_{\cFunc, t}\neq \emptyset \\
        -\infty, &\text{otherwise}
    \end{cases}
\end{equation*}
as the high confidence threshold for the  $\UCBit_{\globalf,t}(\instance)$ to identify a region of interest for the optimization of the objective. Given that $\UCB_{\globalf,t}(\instance^*)\geq f^* \geq f(\instance) \geq \LCB_{\globalf,t}(\instance)$ with the probability specified by the choice of $\beta_{t}$, we define the ROI for the objective optimization as 
\begin{equation*}
    \roi_{\globalf, t} \defeq \{\instance\in\searchSpace\mid  \UCBit_{\globalf,t}(\instance) \geq  \LCB_{\globalf,t, \max}\}
\end{equation*}

By taking the intersection of the ROI of each constraint, we could identify the ROI for identifying the feasible region
\begin{equation*}
\roi_{\cFunc, t} \defeq \bigcap_{\conIdx}^{\conSpace}\roi_{\cFunc_\conIdx, t}  
\end{equation*}

The combined ROI for CBO is determined by intersecting the ROIs of constraints and the objective:
\begin{equation} \label{eq:roi}
\roi_{t} \defeq \roi_{\globalf, t}\cap \roi_{\cFunc, t} 
\end{equation}


\subsection{Combining acquisition functions for CBO}

\paragraph{Acquisition function for optimizing the objective} {To optimize the unknown objective $\globalf$ when $\roi_{t}$ is established, we can employ the following acquisition function \footnote{Same criterion has been studied under the unconstrained setting \citep{zhang2023learning}.}

\begin{equation}\label{eq:acqF}
    \acqF(\instance) \defeq 
    \begin{cases}
        \UCBit_{\globalf,t}(\instance) - \LCB_{\globalf,t, \max} &\text{ }S_{\cFunc, t}\neq \emptyset\\
        \UCBit_{\globalf,t}(\instance) - \LCB_{\globalf,t}(\instance) &\text{otherwise}
    \end{cases}
\end{equation}

At given $t$, to efficiently optimize the black-box $f$ we evaluate the point $\instance_t = \argmax_{\instance \in \roi_{t}} \acqF{(\instance)}$. Since at a given $t$, when $\LCB_{\globalf,t, \max}$ is constant, the acquisition function is equivalent to $\UCBit_{\globalf,t}(\instance)$. }

\paragraph{Acquisition function for learning the constraints} {When we merely focus on identifying the feasible region defined by a certain unknown constraint $\cFunc_{k}$, we could apply the following active learning acquisition function.
\begin{equation}\label{eq:acqC}
    \acqC(\instance) \defeq \UCBit_{\cFunc_\conIdx,t}(\instance) - \LCB_{\cFunc_\conIdx,t}(\instance)
\end{equation}
At given $t$, we evaluate the point $\instance_t = \argmax_{\instance \in U_{\cFunc_\conIdx, t}\cap \roi_{t}} \acqC{(\instance)}$ to efficiently identify the feasible region defined by $\cFunc_\conIdx$. Note that the acquisition function $\acqC(\instance)$ is not maximized on the full $\roi_{\cFunc_\conIdx, t}$, but only on $U_{\cFunc_\conIdx, t}\cap{\roi_t}$.
The active learning on the superlevel-set $S_{\cFunc_\conIdx, t}\cap{\roi_t}$ doesn't contribute to identifying the corresponding feasible region. }


\paragraph{Adaptive Selection Strategy}
With the acquisitions and ROIs established, we propose the algorithm \textbf{\underline{CO}}nstrained \textbf{\underline{B}}O through \textbf{\underline{A}}daptive \textbf{\underline{R}}egion of Interest Acquisition (\algname)\footnote{We briefly discuss the possible extension to decoupled setting, where the objective and constraints may be evaluated independently, of \algname in \appref{sec:decoupled}.}, with its full procedure detailed in Algorithm~\ref{alg:main}. To clarify its selection logic, we elaborate on the core mechanism here. At each iteration $t$, the algorithm first compiles a set $\mathcal{G}$ of candidate functions. This set includes the objective function $\globalf$ and any constraint $\cFunc_\conIdx$ that still has an associated region of uncertainty (i.e., its undecided set $U_{\cFunc_\conIdx, t}$ is non-empty). For each function $g \in \mathcal{G}$, the algorithm then finds the best candidate point by maximizing its own acquisition function: $\instance_{\globalf, t}$ for the objective (line 9) and $\instance_{\cFunc_\conIdx, t}$ for each uncertain constraint (line 7). The adaptive trade-off occurs in line 11, which implements a "winner-takes-all" strategy. The algorithm compares the acquisition values of all candidates (e.g., $\alpha_{\globalf, t}(\instance_{\globalf, t})$ vs. all relevant $\alpha_{\cFunc_\conIdx, t}(\instance_{\cFunc_\conIdx, t})$) and selects the function $g_t$ that offers the maximum value. The next point to query, $\instance_t$, is simply the candidate associated with this winning function (line 12). This process allows \algname to pivot dynamically between optimizing the objective and reducing constraint uncertainty. For a more detailed walkthrough, please see \appref{sec:add_alg} and the illustration in \figref{fig:1D_illustration}.

\paragraph{Implementation Details}
\Algref{alg:main} is presented for a general search space $\searchSpace$. For practical implementation, as in our experiments, we operate on a large, finite discretization of the space, denoted by $\discreteSet \subset \searchSpace$. Consequently, all identification steps (line 4) and maximization steps (lines 7 and 9) are performed over the relevant discrete subset of candidate points. For instance, the search domain $\roi_t$ is replaced by its discrete counterpart, $\discreteROI \defeq \roi_t \cap \discreteSet$. The membership of each point in $\discreteSet$ to the various ROIs and undecided sets can be checked in a pointwise fashion, making the identification steps (line 4) computationally straightforward. While this work focuses on a discrete search space for theoretical clarity, we discuss the extension to continuous domains, where acquisition functions could be optimized using standard gradient-based methods, in \appref{sec:continuous}.

We also illustrate the detailed procedure on a 1D toy example in \figref{fig:1D_illustration}. We construct the example to demonstrate that the explicit, active learning of the constraint doesn't necessarily hurt the optimization but could contribute directly to the simple regret improvement.

\begin{algorithm}[!h]
    \caption{\textbf{\underline{CO}}nstrained \textbf{\underline{B}}O through \textbf{\underline{A}}daptive \textbf{\underline{R}}egion of Interest Acquisition (\algname).}
    \label{alg:main}
        \begin{algorithmic}[1]
            \STATE {\bf Input}:Search space $\searchSpace$, initial observation $\Selected_0$, horizon $T$, confidence factor $\delta$, confidence coefficient $\beta$;
            \FOR{$t = 1\ to\ T$}
                \STATE Update the posteriors of $\GP_{\globalf,t}$ and $\GP_{\cFunc_\conIdx, t}$ according to \eqref{eq:posterior_mean} and \plaineqref{eq:posterior_covar}
                
                \STATE Identify ROIs $\roi_t$, and undecided sets $U_{\cFunc_\conIdx, t}$ 
    
                \FOR{$\conIdx\in\conSpace$}
                    \IF{$U_{\cFunc_\conIdx, t} \neq \emptyset$}
                    \STATE Candidate for learning of each constraint: \\
                    $\instance_{\cFunc_\conIdx, t} \leftarrow \argmax_{\instance \in \discreteROI \cap U_{\cFunc_\conIdx, t}} \acqC{(\instance)}$ %as in 
                    (\plaineqref{eq:acqC})
                    \STATE  $\gG \leftarrow \gG \cup \cFunc_{\conIdx, t}$
                    \ENDIF
                \ENDFOR
                
                \STATE Candidate for optimizing the objective: \\
                $\instance_{\globalf, t} \leftarrow \argmax_{\instance \in \discreteROI} \acqF{(\instance)}$ as in \eqref{eq:acqF}
                \STATE $\gG \leftarrow \gG \cup \globalf$
    
                \STATE Maximize the acquisition from different aspects: \\
                $g_t \leftarrow \argmax_{g \in \gG} \alpha_{g, t}{(\instance_{g, t})} $
    
                \STATE Pick the candidate to evaluate: $\instance_t \leftarrow \instance_{g_t, t}$  
    
                \STATE Update the observation set\\
                $ \Selected_t \leftarrow \Selected_{t-1} \cup \{(\instance_t, y_{\globalf, t}, \{y_{\cFunc_\conIdx, t}\}_{\conIdx\in\conSpace})\}$
            \ENDFOR
        \end{algorithmic}
\end{algorithm}
\paragraph{Exploration and Multiple Feasible Regions}
A key challenge in CBO is ensuring adequate exploration, particularly when the feasible space is non-convex or consists of multiple disjoint regions. \algname addresses this through its acquisition functions (\eqref{eq:acqF} and \eqref{eq:acqC}). By design, the acquisition drives the exploration: regions with high model uncertainty (i.e., large confidence intervals) yield high acquisition values, which naturally encourages the algorithm to sample in less-explored areas. This mechanism is crucial for discovering initially unknown feasible regions. While our Region of Interest ($\roi_t$) focuses the search on promising areas for efficiency, it is dynamic and evolves as the GP models are updated, allowing the search to expand into new areas as uncertainty dictates. We acknowledge that guaranteeing the discovery of all disconnected feasible regions while maintaining rapid convergence is a difficult trade-off, a known challenge in global optimization. Nevertheless, we provide empirical evidence of \algname's robustness in such a scenario in our Rastrigin-1D-1C experiment (see \figref{fig:exps:scan_res}), where our method successfully navigates a search space with multiple feasible regions to find the global optimum.

\begin{figure*}[t]
    \centering
            {
    \includegraphics[trim={1cm 1.2cm 1cm 2cm},
        width=.65\textwidth]{./fig/EG1d_vertical.pdf}
    }
    \caption{Illustration of \algname on a synthetic noise-free 1D example. The first two rows show the GP for the $\cFunc$, the superlevel-set $S_\cFunc$, the region of interest $\roi_{\cFunc}$ and the corresponding acquisition function $\acqC(\instance)$ as defined in \eqref{eq:acqC}. The following two rows show the GP for $\globalf$, the region of interest $\roi_{\globalf}$, and the corresponding acquisition function $\acqF(\instance)$ defined in \eqref{eq:acqF}. We show that after identifying $S_\cFunc$, we could define the threshold for ROI identification of $\globalf$ accordingly.
    The bottom row demonstrates that the general ROI  $\roi$ as defined in \eqref{eq:roi} is identified by taking the intersection ROI for $\globalf$ and $\cFunc$. The general acquisition function is defined as the maximum of the acquisition for $\globalf$ and $\cFunc$ and is maximized on the $\roi$. The scaling and length scale of the GPs are learned via maximum likelihood estimation. }    
    \label{fig:1D_illustration}
\end{figure*}