% \vspace{-0.2cm}
\section{Quadratic Metric Elicitation}
\label{sec:quadme}
% \vskip -0.2cm
We now %are now ready to 
present our procedure for Quadratic Performance Metric Elicitation (QPME). We assume that the oracle's unknown metric is quadratic  (Definition~\ref{def:quadmet}) and seek to estimate its parameters $(\ambf, \Bmbf)$ %Definition~\ref{def:quadmet} 
by posing  queries to the oracle. 
Unlike LPME, a simple binary search based procedure cannot be directly applied to elicit these parameters. Our approach instead approximates the quadratic metric by a linear function at a few select but \emph{feasible} rate vectors and invokes LPME to estimate the local-linear approximations' slopes. 
% This can be done by restricting LPME to a small sphere $\Scal$ around the given point.  
One of the key challenges is to pick a small number of \emph{feasible} rates for performing the local approximations and to reconstruct the original metric \emph{just} from the estimated local slopes. 

\vspace{-0.25cm}
\subsection{Local Linear Approximation}
\vskip -0.2cm
% $\Vert \ambf \Vert_2^2  + \Vert \Bmbf \Vert_F^2 = 1$, 
We will find it convenient to work with a shifted version of the quadratic metric, centered at the  point $\ombf$, the uniform random rate vector (see Proposition \ref{prop:C}): % that  $\ombf$ is the center of sphere $\Scal$ enclosed by the space of rates.
\vspace{-0.1cm}
\begin{align*}
\phi^\quadr(\rmbf;\, \ambf, \Bmbf) &=  
\inner{\dmbf}{\rmbf - \ombf} + \frac{1}{2}(\rmbf - \ombf)^T \Bmbf (\rmbf - \ombf) + c \\
&=\bphi(\rmbf;\, \dmbf, \Bmbf) + c\numberthis \label{eq:quadmetshift},
\end{align*}
\vskip -0.2cm
where $\dmbf= \ambf+\Bmbf\ombf$ and $c$ is a constant independent of $\rmbf$, and so the oracle can be equivalently seen as responding with the shifted metric $\bphi(\rmbf;\, \dmbf, \Bmbf)$.

Note that, due to the scale invariance condition in Definition~\ref{def:quadmet}, the largest singular value of $\Bmbf$ is bounded by 1. This is because $\Vert \Bmbf \Vert_2 \leq \Vert \Bmbf \Vert_F \leq 1$. Thus the metric $\phi^{\quadr}$ is $1$-smooth and implies that it is locally linear around a given rate.
% Since the metric in Definition~\ref{def:quadmet} is smooth, the metric  
To this end, let $z$ be a fixed point in $\Rcal$, then the metric 
can be closely approximated by its first-order Taylor expansion in a small neighborhood around $\zmbf$, for a constant $c'$ as follows:
\vspace{-0.2cm}
\begin{equation}
\bphi(\rmbf;\, \dmbf, \Bmbf) \approx \inner{\dmbf + \Bmbf (\zmbf - \ombf)}{\rmbf} + c'.
\label{eq:loclinapx}
\end{equation}
\vskip -0.2cm
% for a constant $c'$. % independent of $\rmbf$. 
So if we apply LPME to the metric $\bphi$ with the queries $(\rmbf_1, \rmbf_2)$ to the oracle restricted to a small ball around $\zmbf$, the procedure effectively estimates the  slope of the vector $\dmbf + \Bmbf (\zmbf - \ombf)$ in the above linear function (up to a small approximation error). 

We exploit this idea by applying LPME to small neighborhoods around selected  points to  elicit the coefficients $\ambf$ and $\Bmbf$ for the original metric in~\eqref{eq:quadmet}. For simplicity, we will assume that the oracle is noise-free and later show robustness to noise and the query complexity guarantees in Section~\ref{sec:guarantees}.

\vspace{-0.2cm}
\subsection{Eliciting Metric Coefficients}
\vskip-0.2cm
We outline the main steps of Algorithm~1 below. Please see Appendix~\ref{append:sec:qpme} for the full derivation.  
% contains our proposal, elaborate each step below.

\textbf{Estimate coefficients $\dmbf$ (Line 1).}\
We first wish to estimate the linear portion $\dmbf$ of the metric $\bphi$ in~\eqref{eq:quadmetshift}. For this, we
apply the LPME subroutine to a small ball $\Scal_\ombf \subset \Scal$ of radius $\varrho < \rho$ around the point $\ombf$ (Fig.\ \ref{fig:geometry}(a) illustrates this). 
Within this ball, the metric $\bphi$ approximately equals the linear function
$\inner{\dmbf}{\rmbf} + c'$ (see \eqref{eq:loclinapx}), and so the LPME gives us an estimate of the slope of $\dmbf$.
%  Specifically, 
%  we have 
 From Remark~\ref{rm:ratio},  %that 
 the estimates $\fmbf_0 =
 (f_{10}, \dots, f_{k0})$  approximately satisfy the following $(k-1)$ equations: 
% with $\Vert \fmbf_0 \Vert_2=1$ 
        \vspace{-0.2cm}
\begin{equation}
    \frac{d_i}{d_1} = \frac{f_{i0}}{f_{10}} \qquad \forall \; i \in \{2, \dots, k\}.
    \label{eq:0col}
            % \vspace{-6pt}
\end{equation}
% \vskip -5pt

\textbf{Estimate coefficients $\Bmbf$ (Lines 2--4).}
Next, we wish to estimate each column of the matrix $\Bmbf$ of the metric $\bphi$ in~\eqref{eq:quadmetshift}. For this, we apply LPME to small neighborhoods around points in the direction of standard basis vectors $\alphambf_{j} \in \Rmbb^{k}$, $j = 1, \ldots, k$. 
Note that within a small ball around $\ombf + \alphambf_j$, the metric $\ophi$ is approximately  the linear function
$\inner{\dmbf + \Bmbf_{:,j}}{\rmbf} + c'$, and so the LPME procedure when applied to this region will give us an estimate of the slope of $\dmbf + \Bmbf_{:,j}$. However, to ensure that the center point we choose is a feasible rate, we will have to re-scale the standard basis, and apply the subroutine to balls $\Scal_{\zmbf_j}$ of radius $\varrho < \rho$ centered at $\zmbf_j = \ombf + (\rho - \varrho)\alphambf_j$. See Figure~\ref{fig:geometry}(a) for the visual intuition. The returned estimates $\fmbf_j = (f_{1j}, \dots, f_{kj})$ approximately satisfy:
        \vspace{-0.1cm}
\begin{equation}
\frac{d_i + (\rho-\varrho)B_{ij}}{d_1 + (\rho-\varrho)B_{1j}} = \frac{f_{ij}}{f_{1j}} \quad \forall \; i \in \{2, \ldots, k\},\; j \leq i.
\label{eq:jcol}
\end{equation}
% \vskip -0.2cm
Now note that since we are only eliciting slopes using LPME, we always lose out on one degree of freedom. However, the matrix $\Bmbf$ is symmetric, thus we have $k(k+1)/2 - 1$ equations. There are $k(k+1)/2 + k$ unknown entities in $\ambf$ and $\Bmbf$, and to estimate them we need $1$ more equation besides the normalization condition. 
For this, we apply LPME to a sphere $\Scal_{-\zmbf_1}$ of radius $\varrho$ around rate $-\zmbf_1$ as shown in Figure~\ref{fig:geometry}(a). The returned slopes $\fmbf_1^- = (f_{11}^-, \dots, f_{k1}^-)$ approximately satisfy:
\vspace{-0.1cm}
\begin{equation}
    \frac{d_2-(\rho - \varrho)B_{21}}{d_1-(\rho - \varrho)B_{11}} = \frac{f_{21}^-}{f_{11}^-}.
    \label{eq:negativegrad}
            % \vspace{-3pt}
\end{equation}
% \vskip -0.2cm
\textbf{Putting it together (Line 5).}\ By combining~\eqref{eq:0col},~\eqref{eq:jcol} and~\eqref{eq:negativegrad}, and 
denoting $F_{i,j,l} = f_{il} / f_{jl}$ and $F^-_{i,j,l} = f^-_{il}/f^-_{jl}$,
we  express each entry of $\Bmbf$ in terms of $d_1$ as follows:
        % \vspace{-0.15cm}
\begin{align*}
    B_{ij} &= \Big(F_{i,1,j} (1 + F_{j,1,1}) - F_{i,1,j} F_{j,1,0} d_{1} - F_{i,1,0}
    \\&\hspace{1cm}+ 
    F_{i,1,j}\textstyle\frac{F^-_{2,1,1} + F_{2,1,1} - 2F_{2,1,0}}{F^-_{2,1,1} - F_{2,1,1}}\Big)d_1.
    \numberthis \label{eq:poly2elicitamatfinal}
\end{align*}
Using $\dmbf= \ambf+\Bmbf\ombf$ and the fact that the coefficients are normalized, i.e., $\Vert \ambf \Vert_2^2  + \Vert \Bmbf \Vert_F^2 = 1$, we can obtain estimates for $\Bmbf$ and $\ambf$ independent of $d_1$. 
Note that the derivation so far assumes $d_1 \ne 0$. This is based on Assumption  \ref{assump:smoothness} that at least one coordinate of $\dmbf$ is non-zero, which w.l.o.g.\  we  take to be $d_1$.
% In practice, we can identify a non-zero coordinate using $q$ queries of the form $(\embf_i, \ombf), \forall i \in [q]$.
In practice, we can identify a non-zero coordinate using $q$ trivial queries of the form $(\varrho\alphambf_i + \ombf, \ombf), \forall i \in [k]$.

\textbf{Technical novelty.}\ We emphasize that a key difference from~\cite{hiranandani2018eliciting, hiranandani2019multiclass}  is that they rely on a boundary point characterization which may not hold for general nonlinear metrics. 
% including the quadratic metrics. 
Instead, we use structural properties of the metric to estimate local-linear approximations. While this may be a convenient approach (given LPME), as discussed in Section~\ref{sec:intro},  implementing it involves non-trivial challenges, such as: (a) working with \emph{only} slopes for the local-linear functions, (b) ensuring that the center points for the approximations are feasible, and (c) handling multiplicative errors in the analysis
%in the slopes
% are multiplicative and not additive, making the analysis non-standard 
(see Section \ref{sec:guarantees}). 

\begin{figure}[t]
\centering
\fbox{\parbox[t]{0.45\textwidth}{\small{\underline{\bf Algorithm~1: QPM Elicitation}\normalsize}    \\
\small
\textbf{Input:} %Query set 
${\Scal}$, 
Search tolerance $\epsilon > 0$, Oracle $\Omega$ with %(unknown) 
metric $\bphi$\\
1: \text{ \ }$\fmbf_0 \leftarrow$ LPME$\left(\Scal_\ombf, \epsilon, \Omega\right)$ with $\Scal_\ombf \subset {\Scal}$ and obtain~\eqref{eq:0col}\\
2: \text{ \ }\textbf{For} \, $j \in \{1,2,\dots,k\}$ \textbf{do}\\
3: \text{ \ \ \ } $\fmbf_j\leftarrow$LPME$\left(\Scal_{\zmbf_j}, \epsilon, \Omega\right)$ with $\Scal_{\zmbf_j} \subset {\Scal}$ and obtain~\eqref{eq:jcol}\\
4: \text{ \ }$\fmbf^-_{1} \leftarrow$ LPME$\left(\Scal_{-\zmbf_1}, \epsilon, \Omega\right)$ with $\Scal_{-\zmbf_1}\hspace{-2pt}\subset\hspace{-1pt} {\Scal}$ and obtain~\eqref{eq:negativegrad}\\
5: \text{ \ }$\ambfhat, \Bmbfhat \leftarrow $ normalized solution dervied from%~\eqref{eq:0col} and
~\eqref{eq:poly2elicitamatfinal}\\
\textbf{Output:} $\ambfhat, \Bmbfhat$ 
\normalsize \vspace{-0.25em}
}}
\label{alg:q-me}
\vspace{-12pt}
\end{figure}