\section{Theory}
The notations and conventions used here follow that used in \cite{ItanoQuad}.  The principal-axis (primed) frame $(x',y',z')$ is one in which the electric potential in the neighbourhood of the atom has the simple form
\begin{equation}
\label{principalEP}
\Phi(x',y',z')=A(x'^2+y'^2-2z'^2)+\epsilon(x'^2-y'^2),
\end{equation}
while a laboratory (unprimed) frame $(x,y,z)$ is one in which the magnetic field is oriented along the $z$ axis.  Using this form of the potential,
the time-dependent potential associated with an ideal linear Paul trap has $A=0$ and that for the ideal quadrupole trap has $\epsilon=0$, with the time-dependence provided by a $\cos(\Omega_\mathrm{rf} t)$ factor, where $\Omega_\mathrm{rf}$ is the trap drive frequency.

In the principal-axis frame, the spherical components of $\nabla\mathbf{E}^{(2)}$ are
\begin{equation}
\nabla E_0^{(2)'}=-2A, \quad \nabla E_{\pm1}^{(2)'}=0, \quad \nabla E_{\pm2}^{(2)'}=\epsilon \sqrt{\frac{2}{3}}.
\end{equation}
and the interaction $H_Q$ has the simple form
\begin{equation}
\label{quadInteraction}
H_Q=-2 A \Theta_0^{(2)'}+\epsilon \sqrt{\frac{2}{3}}\left(\Theta_{2}^{(2)'}+\Theta_{-2}^{(2)'}\right).
\end{equation}
States $\ket{JFm}'$ defined in the principal-axis frame and states $\ket{JF\mu}$ defined in the laboratory frame are related by
\begin{equation}
\ket{JFm}'=\sum_\mu D_{\mu, m}^{(F)}(\boldsymbol{\omega})\ket{JF\mu},
\end{equation}
with the inverse relation
\begin{equation}
\ket{JF\mu}=\sum_m D_{\mu, m}^{(F)^*}(\boldsymbol{\omega})\ket{JFm}',
\end{equation}
where $\boldsymbol{\omega}$ denotes a set of Euler angles $\{\alpha,\beta,\gamma\}$ taking the principal-axis frame to the laboratory frame defined with the same convention used in \cite{ItanoQuad}.  Specifically, starting from the principle axis frame, the coordinate system is rotated about $z$ by $\alpha$, then about the new $y$ axis by $\beta$ and then about the new $z$ axis by $\gamma$ so that the rotated coordinate system coincides with the laboratory coordinate system.  As the rotation $\gamma$ is parallel to the magnetic field, it has no effect and can be set to zero.  The rotation matrices $D_{\mu, m}^{(F)}(\boldsymbol{\omega})$ are given in the passive interpretation for which expressions can be found in \cite{edmonds2016angular}.

Matrix elements of $\Theta_{q}^{(2)'}$ in the laboratory frame can then found using the same derivation given in \cite{ItanoQuad}, generalized to include off-diagonal matrix elements. Explicitly
\begin{widetext}
\begin{align}
\bra{JF'\mu'}\Theta_{q}^{(2)'}\ket{JF\mu}&=\sum_{m',m} D_{\mu',m'}^{(F')}(\boldsymbol{\omega}) D_{\mu, m }^{(F)^*}(\boldsymbol{\omega})\; {^\backprime\bra{JF'm'}}\Theta_{q}^{(2)'}\ket{JFm}'\\
&=\langle{JF'}\|\Theta^{(2)}\|JF\rangle\sum_{m',m} D_{\mu',m'}^{(F')}(\boldsymbol{\omega}) D_{\mu, m }^{(F)^*}(\boldsymbol{\omega})(-1)^{F'-m'}\begin{pmatrix}F' & 2 & F\\-m' & q & m\end{pmatrix}\\
&=\langle{JF'}\|\Theta^{(2)}\|JF\rangle\sum_{m',m} D_{\mu',m'}^{(F')}(\boldsymbol{\omega}) D_{-\mu, -m }^{(F)}(\boldsymbol{\omega})(-1)^{F'-m'+\mu-m}\begin{pmatrix}F' & 2 & F\\-m' & q & m\end{pmatrix}\\
&=(-1)^{F'-\mu-q}\langle{JF'}\|\Theta^{(2)}\|JF\rangle\sum_{m',m} D_{\mu',m'}^{(F')}(\boldsymbol{\omega}) D_{-\mu, -m }^{(F)}(\boldsymbol{\omega})\begin{pmatrix}F' & 2 & F\\-m' & q & m\end{pmatrix}\\
&=(-1)^{F'-\mu-q}\langle{JF'}\|\Theta^{(2)}\|JF\rangle\nonumber\\
&\qquad\times\sum_{\substack{m',m\\K,n',n}} (2K+1) \begin{pmatrix}F' & 2 & F\\-m' & q & m\end{pmatrix}\begin{pmatrix}F' & F & K\\ \mu' & -\mu & n'\end{pmatrix}\begin{pmatrix}F' & F & K\\ m' & -m & n\end{pmatrix}D_{n',n}^{(K)^*}(\boldsymbol{\omega})\\
&=(-1)^{F'-\mu-q}\langle{JF'}\|\Theta^{(2)}\|JF\rangle\nonumber\\
& \qquad\times\sum_{\substack{m',m\\K,n',n}} (2K+1) \begin{pmatrix}F' & F & K\\ \mu' & -\mu & n'\end{pmatrix}\begin{pmatrix}F' & F & 2\\ m' & -m & -q\end{pmatrix}\begin{pmatrix}F' & F & K\\ m' & -m & n\end{pmatrix}D_{n',n}^{(K)^*}(\boldsymbol{\omega})\\
&=(-1)^{F'-\mu-q}\langle{JF'}\|\Theta^{(2)}\|JF\rangle\sum_{n'} \begin{pmatrix}F' & 2 & F\\ -\mu' & -n' & \mu \end{pmatrix} D_{n',-q}^{(2)^*}(\boldsymbol{\omega})\\
&=(-1)^{F'-\mu-q}\langle{JF'}\|\Theta^{(2)}\|JF\rangle \begin{pmatrix}F' & 2 & F\\ -\mu' & \Delta \mu & \mu \end{pmatrix} D_{-\Delta\mu,-q}^{(2)^*}(\boldsymbol{\omega})\\
&=(-1)^{F+\mu'}\langle{JF'}\|\Theta^{(2)}\|JF\rangle \begin{pmatrix}F & 2 & F'\\ \mu & \Delta \mu & -\mu' \end{pmatrix} D_{\Delta\mu,q}^{(2)}(\boldsymbol{\omega}),
\end{align}
where $\Delta\mu=\mu'-\mu$.  Using the $IJ$-coupling approximation, the reduced matrix element may be written in terms of the usual quadrupole moment $\Theta(J)=\bra{JJ}\Theta_0^{(2)}\ket{JJ}$ giving the final expression
\begin{multline}
\label{GME}
\bra{(IJ)F'\mu'}\Theta_{q}^{(2)'}\ket{(IJ)F\mu}=(-1)^{F'+F+I+J+\mu'}\sqrt{(2F'+1)(2F+1)}\\
\times \begin{Bmatrix}F & F' & 2\\J & J &I\end{Bmatrix}\begin{pmatrix}F & 2 & F'\\ \mu & \Delta \mu & -\mu' \end{pmatrix} \begin{pmatrix}J & 2 & J\\ -J & 0 & J \end{pmatrix}^{-1} \Theta(J) D_{\Delta\mu,q}^{(2)}(\boldsymbol{\omega}),
\end{multline}
where $I$ is included in the notation to identify the ordering of the $IJ$ coupling.
\end{widetext}
The only $q$-dependence for the matrix element appears in the Wigner rotation matrices and, from \cite{edmonds2016angular}
\begin{subequations}
\label{Wigner}
\begin{align}
D_{0,2}^{(2)}(\boldsymbol{\omega})+D_{0,-2}^{(2)}(\boldsymbol{\omega})&=\sqrt{\frac{3}{2}}\sin^2\beta\cos2\alpha, \\
\label{linear1}
D_{\pm1,2}^{(2)}(\boldsymbol{\omega})+D_{\pm1,-2}^{(2)}(\boldsymbol{\omega})&=\mp(\cos\beta\sin\beta \cos2\alpha\nonumber\\
&\qquad \pm i \sin\beta \sin2\alpha),\\
\label{linear2}
D_{\pm2,2}^{(2)}(\boldsymbol{\omega})+D_{\pm2,-2}^{(2)}(\boldsymbol{\omega})&=\frac{1}{2}\left(1+\cos^2\beta\right)\cos2\alpha\nonumber \\
&\qquad \pm i \cos\beta \sin2\alpha,\\
D_{0,0}^{(2)}(\boldsymbol{\omega}) &=\frac{1}{2}\left(3\cos^2\beta-1\right),\\
D_{\pm1, 0}^{(2)}(\boldsymbol{\omega}) & = \pm\sqrt{\frac{3}{2}}\;\sin\beta \cos\beta,\\
D_{\pm2, 0}^{(2)}(\boldsymbol{\omega}) & = \sqrt{\frac{3}{8}}\;\sin^2 \beta.
\end{align}
\end{subequations}

Equations ~\ref{GME} and \ref{Wigner} can then be used to determine the various influences of the time-varying trapping potential by considering the time-dependent interaction $H_Q \cos(\Omega_\mathrm{rf} t)$.  This implicitly assumes that there are no phase shifts between sources determining the electric potential given in Eq.~\ref{principalEP}.  If this were not the case, Eq.~\ref{principalEP} would have to be modified to account for a non-zero electric field at the ion position.  In the current context, such modifications would have negligible effect in any practical setup: a small phase shift between electrodes would result in a correspondingly small correction to Eq.~\ref{principalEP} and, for a trap with reasonable symmetry, correction terms would have a near-zero electric-field gradient in the neighbourhood of the ion anyway.

As with an oscillating magnetic field, the oscillating quadrupole field will (i) modulate energy levels giving rise to rf sidebands when transitions connected to the level are driven, (ii) drive resonances between levels having an energy difference matching the trap drive frequency, and (iii) shift energy levels due to off-resonant coupling to other levels.  These effects will have a complicated dependence on trap geometry and orientation with respect to the laboratory frame.  For a given setup, this can be readily calculated, but general expressions are not so illuminating.  Therefore specific examples will be used to illustrate key considerations.

To determine the typical scale of the quadrupole shift, first note that the ideal linear Paul trap ($A=0$) has
\begin{equation}
\label{epsilon}
\epsilon=\frac{m \Omega_\mathrm{rf} \omega_s}{e\sqrt{2}},
\end{equation}
where $\omega_s$ is psuedo-potential confinement frequency and $e$ the usual electron charge.  Similarly, the ideal quadrupole trap ($\epsilon=0$), has the same expression for $A$ with $\omega_s$ being the smaller radial confinement frequency.  Hence, matrix elements have a typical scale of $\epsilon \Theta(J)$.  For the $^1S_0$-to-$^3D_2$ clock transition in $^{176}$Lu$^+$, the magic rf at which micromotion shifts vanish is $\Omega_\mathrm{rf}\sim 2\pi\times 33\,\mathrm{MHz}$ \cite{arnold2018blackbody}, and the calculated value for $\Theta({^3}D_2)$ is $-1.77ea_0^2$ \cite{porsev2018clock}.  Using $\omega_s=2\pi\times 1\,\mathrm{MHz}$ then gives $\epsilon \Theta(J)/\hbar \sim 2\pi\times \,2\mathrm{kHz}$.  Lighter atoms often use higher $\Omega_\mathrm{rf}$ and/or have larger values of $\omega_s$.  Consequently, the value quoted for $^{176}$Lu$^+$ is reasonably indicative for other systems.  The exceptions would be those levels having an anomalously small quadrupole moment such as the ${^1}D_2$ level of Lu$^+$ \cite{porsev2018clock} or the $^2F_{7/5}$ level of Yb$^+$ \cite{huntemann2012high}.
\section{Effects within a single hyperfine level}
\subsection{Sideband modulation}
The time-varying frequency shift of a level will give rise to a sideband signal, as is the case for micromotion \cite{berkeland1998minimization} and the $z$ component of an ac magnetic field \cite{meir2018experimental,gan2018oscillating}.  The modulation index associated with the sideband is simply determined by the amplitude of the quadrupole shift divided by the trap drive frequency.  For $A=0$, the quadrupole-induced modulation index for a state $\ket{F,m_F}$ is
\begin{align}
\beta_Q&=\frac{\bra{F,m_F}H_Q\ket{F,m_F}}{\hbar \Omega_\mathrm{rf}}\\
&=\frac{m \omega_s}{\hbar e\sqrt{2}} C^{(2)}_{F,m_F} \Theta(J)\sin^2\beta\cos 2\alpha,
\end{align}
where $C^{(2)}_{F,m_F}$ is
\begin{multline}
C^{(2)}_{F,m_F}=(-1)^{2F+I+J+m_F}(2F+1)\\
\times \begin{Bmatrix}F & F & 2\\J & J &I\end{Bmatrix}\begin{pmatrix}F & 2 & F\\ m_F & 0 & -m_F \end{pmatrix} \begin{pmatrix}J & 2 & J\\ -J & 0 & J \end{pmatrix}^{-1}.
\end{multline}
Typically, $\Theta(J)\sim e a_0^2$ and $C^{(2)}_{F,m_F}\lesssim 1$.  Consequently $\beta_Q\lesssim 10^{-4}$ in most circumstances of interest and typically less than the modulation index arising from thermally-induced intrinsic micromotion \cite{keller2015precise}.
\subsection{Resonant Zeeman coupling}
\label{RZC}
The quadrupole field can induce a precession of the spin when the Zeeman splitting between levels is resonant with the trap drive rf.  Since the quadrupole field can drive both $\Delta m=\pm1$, and $\pm2$ transitions, resonances occur when the Zeeman splitting between neighbouring $m$-states matches either $\Omega_\mathrm{rf}$ or $0.5\Omega_\mathrm{rf}$. Of interest are the $\Delta m=\pm 1$ transitions as this resonance can be used to measure trap-induced ac-magnetic fields \cite{gan2018oscillating}.  Accurate assessment of the magnetic field from the measured coupling strength would have to take into account the contribution from the quadrupole field.

To illustrate, consider the $F=5$ level of $^3D_2$ in $^{176}$Lu$^+$.  This level has the largest $g_F$ factor among all available clock levels and hence the smallest static field required to obtain resonance.  Within this level, the transition from $\ket{5,0}$ to $ \ket{5,\pm1}$ has the strongest magnetic coupling with a sensitivity of $21\,\mathrm{kHz/\mu T}$.  It also has the weakest quadrupole coupling within the $F=5$ manifold.  For $A=0$, the quadrupole coupling is given by
\begin{align}
\Omega_Q&=\frac{\bra{5,\pm1}H_Q\ket{5,0}}{\hbar}\nonumber\\
&=\sqrt{\frac{2}{3}}\frac{m \Omega_\mathrm{rf} \omega_s}{\hbar e\sqrt{2}}\left(\frac{\sqrt{5}}{26}\right)\Theta(J)\nonumber\\
&\qquad\times(\cos\beta\sin\beta \cos2\alpha\pm i \sin\beta \sin2\alpha).
\end{align}
Using $\omega_s=2\pi\times 1\,\mathrm{MHz}$,  $\Omega_\mathrm{rf}= 2\pi\times 33\,\mathrm{MHz}$, $\Theta({^3}D_2)=-1.77ea_0^2$ and neglecting the spatial orientation factor gives $\Omega_Q=2\pi\times 140\,\mathrm{Hz}$.  Going to a slightly higher static field would enable the $F=5$ level of $^1D_2$ level to be used instead.  This level has a $\sim20\%$ smaller sensitivity to ac magnetic fields, but the quadrupole moment is a factor 80 smaller \cite{porsev2018clock}.

In principle, the resonance at $0.5\Omega_\mathrm{rf}$ allows the quadrupole moment to be measured as first pointed out by Itano \cite{ItanoQuadExp}.  As this resonance only involves $|\Delta m|=2$ transitions, it cannot be driven by an ac magnetic field and only depends on the quadrupole coupling.  From trap frequency measurements, $A$ and $\epsilon$ can be accurately measured and maximising the coupling strength as a function of magnetic field direction fixes the orientation factor.  Hence the maximised coupling strength could then be related directly to the quadrupole moment.  A proof-of-principle demonstration using $^{138}$Ba$^+$ is given in section~\ref{experiment}.
\subsection{Off-resonant coupling}
When the Zeeman splittings do not match $\Omega_\mathrm{rf}$, off-resonant coupling modifies the Zeeman splitting.  In the case of an ac-magnetic field, the shift of each state is proportional to $m$ and can be viewed as a modified $g$-factor for the hyperfine level of interest.  In analogy with the ac Stark shift, the shift of level $m$ is given by
\begin{multline}
\frac{\delta E}{\hbar} =
-\sum_{\Delta m} \Bigg(\frac{|\bra{F,m+\Delta m}H_Q\ket{F,m}|^2}{2\hbar^2}\\
\times\frac{\omega_z \Delta m}{(\omega_z \Delta m)^2-\Omega_\mathrm{rf}^2}\Bigg),
\end{multline}
where $\omega_z=g_F \mu_B B_0/\hbar$ is the Zeeman splitting between neighbouring $m$-states.  The expression gives rise to terms proportional to $m$ and $m^3$.  In the limit that the Zeeman splitting is much less than $\Omega_\mathrm{rf}$, the effect has a scale of $(\epsilon\Theta(J)/\Omega_\mathrm{rf})^2$, which is likely well below $10^{-8}$ in most circumstances.
\section{Clock shifts}
For clocks with a hyperfine structure, it is prudent to estimate the shift that the oscillating quadrupole will have on the clock frequency.  In the limit that the trap drive frequency is much smaller than the hyperfine splittings, the shift of an $m=0$ clock state is given by
\begin{equation}
\label{clockshift}
h\delta \nu_F =
-\sum_{\Delta m,F'\neq F} \frac{|\bra{F',\Delta m}H_Q\ket{F,0}|^2}{2(E_{F'}-E_F)}.
\end{equation}
The summation excludes $F'=F$ as contributions within a hyperfine level cancel for $m=0$ states.  Each value of $|\Delta m|$ in the summation has a unique orientation dependence determined by the appropriate term in Eqs.~\ref{Wigner}.  In general, the weighting between different values of $|\Delta m|$ are dependent on the hyperfine structure resulting in a rather complicated orientation dependence of the shift.   Moreover, the shift does not cancel with various averaging methods \cite{ItanoQuad, dube2005electric, barrett2015NJP}.

Weightings for each $|\Delta m|$ can be readily calculated and, in the case of Lu$^+$, the result of hyperfine averaging \cite{barrett2015NJP} is easily included.  Hyperfine averaging cancels contributions from $\Delta m=0$ terms, which maybe readily verified from Eq.~\ref{clockshift}.  The fractional frequency shift can then be written in the form
\begin{equation}
\label{ShiftEq}
\frac{\delta \nu}{\nu}= a(f_2(\alpha,\beta)+\eta f_1(\alpha,\beta)),
\end{equation}
where $f_k(\alpha,\beta)$ is the magnitude squared of the appropriate orientation dependence for $|\Delta m|=k$ taken from Eqs.~\ref{Wigner}.  For $A=0$ this would be Eq.~\ref{linear1} and Eq.~\ref{linear2} for $f_1(\alpha,\beta)$ and $f_2(\alpha,\beta)$ respectively.

From quadrupole moments calculated in \cite{porsev2018clock} and measured hyperfine splittings \cite{kaewuam2017laser,kaewuam2018laser}, values of $a$ and $\eta$ can be readily calculated for a given trap setup. In table~\ref{LuShifts} values are tabulated using $A=0$, $\omega_s=2\pi\times 1\,\mathrm{MHz}$, and $\Omega_\mathrm{rf}= 2\pi\times 33\,\mathrm{MHz}$.  For all three clock transitions $\eta\approx-0.2$ giving maximum and minimum values of 1 and $\eta$, respectively, for $f_2(\alpha,\beta)+\eta f_1(\alpha,\beta)$.
\begin{table}
 \caption{Parameters for Eq.~\ref{ShiftEq} determining the fractional frequency shifts of clock transitions in $^{176}$Lu$^+$.  Values are calculated using $\omega_s=2\pi\times 1\,\mathrm{MHz}$, $\Omega_\mathrm{rf}= 2\pi\times 33\,\mathrm{MHz}$ and quadrupole moments calculated in \cite{porsev2018clock}.}
 \label{LuShifts}
\begin{ruledtabular}
\begin{tabular}{c c c}
 \hspace{0.5cm}Transition & $a\;(10^{-19})$ & $\eta$ \hspace{0.5cm}\\
 \hline
\hspace{0.5cm}$^1S_0\leftrightarrow{^3}D_1$ & 1.28 & \hspace{0.25cm}-0.199 \hspace{0.5cm} \\
\hspace{0.5cm}$^1S_0\leftrightarrow{^3}D_2$& -0.90 & \hspace{0.25cm}-0.197 \hspace{0.5cm} \\
\hspace{0.5cm}$^1S_0\leftrightarrow{^1}D_2$ & 2.34[-4] & \hspace{0.25cm}-0.212 \hspace{0.5cm} \\
 \end{tabular}
 \end{ruledtabular}
 \end{table}

In a linear ion chain it would be desirable or indeed necessary to have $\beta\approx \cos^{-1}(1/\sqrt{3})$ to cancel quadrupole shifts induced by neighbouring ions.  In this case $f_2(\alpha,\beta)+\eta f_1(\alpha,\beta)\approx (3+\cos(4\alpha))/10$.  Consequently, the trap-induced rf quadrupole shift will be below $10^{-19}$ in any realistic circumstances.

Although the shifts are not likely to be a limitation in any foreseeable future, they could be assessed using resonant Zeeman coupling discussed in sect.~\ref{RZC}. Dominant contributions to the shift arise from the $|\Delta m|=2$ couplings, which have the same scaling factors and orientation dependence as the coupling strength of the resonance that occurs when the Zeeman splitting matches $0.5\Omega_\mathrm{rf}$.  Measurement of this resonant coupling strength could then provide a reasonable estimate of the associated clock shifts.
\section{Measuring the quadrupole coupling}
\label{experiment}
Coupling from the ac quadrupole field confining the ion can be observed when the Zeeman splitting of a level supporting a quadrupole moment matches $0.5\Omega_\mathrm{rf}$.  In this section a proof-of-principle demonstration is given using the $S_{1/2}-D_{5/2}$ clock transition at 1762\,nm in $^{138}$Ba$^+$.  Theoretical estimates of the $D_{5/2}$ quadrupole moment have been estimated by a number of researchers \cite{itano2006quadrupole, sahoo2006relativistic, sur2006electric, jiang2008electric} and the $g$-factor of $\sim 6/5$ allows the resonant condition to be meet at easily achievable fields ($\lesssim 1\,\mathrm{mT}$).

The experiment is performed in a linear Paul trap similar to that used for previous work \cite{kaewuam2017laser,arnold2018blackbody}. The trap consists of two axial endcaps separated by $\sim2\,\mathrm{mm}$ and four rods arranged on a square with sides $1.2\,\mathrm{mm}$ in length. All electrodes are made from $0.45\,\mathrm{mm}$ electropolished copper-beryllium rods. Radial confinement is provided by a $20.585\,\mathrm{MHz}$ radio-frequency (rf) potential applied to a pair of diagonally opposing electrodes via a helical quarter-wave resonator.  With only differential voltages on the dc electrodes to compensate micromotion, the measured trap frequencies of a single $^{138}$Ba$^+$ are $(\omega_x,\omega_y,\omega_z)\sim 2\pi\times(990,895,112)\,\mathrm{kHz}$, with the trap axis along $z$.  Measurements described here were carried out in this configuration.  Ideally, with only an rf confinement, $\omega_z=\omega_x-\omega_y$, as can be readily verified from Eq.~\ref{principalEP}.  Deviations from this indicate an asymmetry resulting in field curvatures from the micromotion compensation potentials.

To maximise the coupling to the quadrupole field, a magnetic field is aligned along the trap axis such that the principle and laboratory axes are aligned, that is, $\beta\approx0$ and $\alpha$ can be arbitrarily set to zero.  In this configuration the coupling strength for $\Delta m=\pm2$ transitions depends only on $\epsilon$.  Since the dc confinement from the micromotion compensation would not significantly affect the radial confinement, $\epsilon$ can be estimated by Eq.~\ref{epsilon} with $\omega_s$ given by the mean of $\omega_x$ and $\omega_y$. Moreover, for $\beta \ll 1$, the coupling strength varies quadratically with $\beta$ and is therefore insensitive to the exact alignment of the field to the trap axis.  However, limited optical access prevents optical pumping to a particular $m_J$ ground state, which limits population transfer to 0.5 when driving the clock transition and diminishes signal-to-noise.

As depicted in Fig.~\ref{BaFig}, we consider driving the optical transition from $\ket{S_{1/2},m=1/2}$ to $\ket{D_{5/2},m=1/2}$.  The excited state Zeeman splitting $\omega_z=g_D\mu_B B_0/\hbar$ is set to one half the trap drive frequency $\Omega_\mathrm{rf}$, resulting in a resonant quadrupole coupling to $\ket{D_{5/2},5/2}$ and  $\ket{D_{5/2},-3/2}$.  With $\beta=0$, the Hamiltonian can be written
\begin{equation}
\label{Eq:Hamiltonian}
H/\hbar = \begin{pmatrix} -\Delta & \frac{\omega_\mathrm{Q}}{\sqrt{10}} & 0 & 0\\  \frac{\omega_\mathrm{Q}}{\sqrt{10}}  & 0 &  \frac{3 \omega_\mathrm{Q}}{5\sqrt{2}} &  \frac{1}{2}\Omega_{0}\\ 0 &   \frac{3 \omega_\mathrm{Q}}{5\sqrt{2}} & \Delta &  0\\  0 &\frac{1}{2}\Omega_{0} &0& \delta \end{pmatrix},
\end{equation}
where $\omega_Q=\epsilon \Theta/\hbar$ is the characteristic strength of the quadrupole coupling, $\Omega_0$ is the coupling strength of the clock laser, and the rotating wave approximation has been used for both the quadrupole and laser coupling.  This assumes the detunings $\Delta=\Omega_\mathrm{rf}-2\omega_z$, and $\delta=\omega-\left(\omega_0+(\omega_z-\omega'_z)/2\right)$ are both small with respect to $\Omega_\mathrm{rf}$ and the Zeeman-shifted clock frequency $\omega_0+(\omega_z-\omega'_z)/2$, respectively. In this last expression $\omega'_z=g_S\mu_B B_0/\hbar$ is the Zeeman splitting between the $S_{1/2}$ states.
\begin{figure}
\begin{center}
  \includegraphics[width=0.25\textwidth]{BaLevels.pdf}
  \caption{Level structure of $^{138}$Ba$^+$ used in the measurement of the quadrupole moment of $D_{5/2}$.  The clock laser drives $\ket{S_{1/2},m=1/2}$ to $\ket{D_{5/2},m=1/2}$ with coupling strength $\Omega_0$.  The oscillating quadrupole field confining the ion couples $\ket{D_{5/2},1/2}$ to $\ket{D_{5/2},-3/2}$ and $\ket{D_{5/2},5/2}$. Dashed levels do not contribute to the dynamics.}
  \label{BaFig}
\end{center}
\end{figure}

When $\Omega_0\ll \omega_Q$, the quadrupole coupling results in an Autler-Townes triplet \cite{autler1955stark} as illustrated in Fig.~\ref{AutlerTownes}.  Plots are given for $\Omega_0=0.05\,\omega_Q$ (left) and $\Omega_0=0.3\,\omega_Q$ (right) and for detunings $\Delta=0, 0.25\,\omega_Q,$ and $0.5\,\omega_Q$.  In all cases the clock interrogation time is given by $\tau=\pi/\Omega_0$.  Note that there are only two lines when $\Delta=0$ due to the fact that one of the dressed states has no amplitude in $\ket{D_{5/2},1/2}$ as is evident from Eq.~\ref{Eq:Hamiltonian} for this case.
\begin{figure}
\begin{center}
  \includegraphics[width=\columnwidth]{theoryplots.pdf}
  \caption{Theoretical curves derived from Eq.~\ref{Eq:Hamiltonian} for different values of $\Omega_0$ and $\Delta$.  Plots on the left and right have $\Omega=0.05\omega_Q$ and $0.3\omega_Q$ respectively.  Detunings $\Delta$ from top to bottom are $0,0.25\omega_Q,$ and $0.5\omega_Q $. All plots use an interrogation time $\tau=\pi/\Omega_0$, which is the $\pi$-time when the Zeeman splitting is far from the quadrupole resonance.}
  \label{AutlerTownes}
\end{center}
\end{figure}

Experimentally, magnetic field noise limits the clock probe time.  This limits the resolution of the Autler-Townes splitting, as illustrated in Fig.~\ref{AutlerTownes}, and the experimentally observed signal is further degraded by the changing detunings induced by magnetic field variations as seen in three data runs shown in Fig.~\ref{quadExp}.  For all data sets $\Delta \approx 0$ and the clock probe time is set to $1.2\,\mathrm{ms}$, which is the $\pi$-time for the transition when the Zeeman splitting is far from the quadrupole resonance.  Each data point represents 200, 300, and 500 experiments for plots (a), (b), and (c) respectively.   The solid curve given in each plot is derived using a Gaussian distributed magnetic field noise, which is assumed constant within a single experiment.  The standard deviation ($\sigma$) of magnetic field deviations about the mean and $\omega_Q$ are determined by a $\chi^2$-fit to the data.  Fit parameters and the reduced-$\chi^2$ for each dataset are given in Table~\ref{dataFits}.  The quoted errors in the fit parameters are determined by standard methods using the covariance matrix from the fit and have used error scaling to allow for the larger values of $\chi^2$.  Offset detunings have not been included in the fits as their inclusion does not significantly change the $\chi^2$ or the fitted values of $\sigma$ and $\omega_Q$.
\begin{figure*}
\begin{center}
  \includegraphics[width=\linewidth]{quadrupole_dataplots.pdf}
  \caption{Experimentally observed signals as a function of the clock laser detuning from the  $\ket{S_{1/2},1/2}$ to $\ket{D_{5/2},1/2}$ transition.  Each data point represents 200, 300, and 500 experiments for plots (a), (b), and (c) respectively.  Solid curves are fits using the rms spread of an assumed Gaussian magnetic field noise, and quadrupole coupling strength, $\omega_Q$, as fitting parameters.  Fit parameters are tabulated in Table~\ref{dataFits}.}
  \label{quadExp}
\end{center}
\end{figure*}
\begin{table}
 \label{dataFits}
\caption{Fit parameters and reduced-$\chi^2$ for the curves given in Fig.~\ref{quadExp}.  Errors are determined by standard methods using the covariance matrix from the fit and have used error scaling to allow for the larger values of $\chi^2$.}
\begin{ruledtabular}
\begin{tabular}{l c c c c}
\hspace{0.25cm} Plot & N & $\omega_Q/2\pi$ (Hz) & $\sigma$ (nT) & $\chi_\nu^2$ \hspace{0.25cm} \\
 \hline
\hspace{0.25cm} Fig.~\ref{quadExp}(a) & 200 & $1708\,(24)$ & $18.2\,(1.1)$  & 1.15 \hspace{0.25cm} \\
\hspace{0.25cm} Fig.~\ref{quadExp}(b) & 300 & $1662\,(19)$ & $18.4\,(0.8)$ & 1.11 \hspace{0.25cm} \\
\hspace{0.25cm} Fig.~\ref{quadExp}(c) & 500 & $1713\,(16)$ & $18.2\,(0.7)$ & 1.48 \hspace{0.25cm} \\
 \end{tabular}
 \end{ruledtabular}
 \end{table}
The reduced $\chi^2$ of 1.49 for plot (c) indicates a statistically poor fit and the difference in $\omega_Q$ for plot (b) is statistically significant.  This is likely due to slow variations of the average magnetic field over the timescales of a full data scan, which are not captured by the model.  The fitted values of $\sigma$ are consistent with the coherence times and stabilities observed when servoing on the clock transition.  However, this does not account for a possible linear drift of the mean magnetic field over the duration of the scan, which would increase or decrease the fitted value of $\omega_Q$ depending on sign of the drift.  Based on clock servo data taken over 6 hours, this drift is unlikely to be more than $20\,\mathrm{nT}$ over the duration of any scan shown in Fig.~\ref{quadExp}. This corresponds to an error of approximately 1.4\% or $24\,\mathrm{Hz}$ in $\omega_Q$.  Adding this error in quadrature with the largest error from the fits and taking the mean of the fitted values gives $\omega_Q=2\pi\times 1.694(35)\,\mathrm{kHz}$ as an estimate of the coupling strength.

To estimate the quadrupole moment $\Theta$, an estimate of $\epsilon$ and hence $\omega_s$ is needed.  As noted, $\omega_s$ is ideally given by the mean of $\omega_x$ and $\omega_y$ and $\omega_z=\omega_x-\omega_y$.  Taking the discrepancy between measured values of $\omega_z$ and $\omega_x-\omega_y$ as a conservative error estimate gives $\omega_s=2\pi\times943(17)\,\mathrm{kHz}$.  Using Eq.~\ref{epsilon} and the definition of $\omega_Q$ then gives $\Theta=3.229(89) e a_0^2$.  A comparison with available theoretical estimates is given in Table~\ref{quadComparison}.  Although the estimated value is in fair agreement with the theoretical value of $\Theta=3.319\,e a_0^2$ given in \cite{jiang2008electric}, a more precise experimental value would be desirable to test the accuracy of the theory.
\begin{table}
 \label{quadComparison}
\caption{Comparison of the current experimental and theoretical estimates of the electric quadrupole moment for the $5d\,D_{5/2}$ level of Ba$^+$.  All values of given in units of $e a_0^2$.}
\begin{ruledtabular}
\begin{tabular}{l c c c c}
\hspace{0.25cm} Present & Ref.~\cite{itano2006quadrupole} & Ref.~\cite{sahoo2006relativistic} & Ref.~\cite{sur2006electric} & Ref.~\cite{jiang2008electric} \hspace{0.25cm} \\
 \hline
\hspace{0.25cm} 3.229(89) & 3.379 & 3.42(4) & 3.382(61)  & 3.319(15) \hspace{0.25cm}
 \end{tabular}
 \end{ruledtabular}
 \end{table}

The implementation here was is limited by magnetic field noise and stability of the mean magnetic field over longer timescales.  Modest improvements in magnetic field noise would allow individual dressed states to be resolved.  With consideration of both $\ket{S_{1/2},\pm1/2}$ to $\ket{D_{5/2},1/2}$ transitions, the clock laser could be servoed to the outer dressed states associated with each transition.  This would allow (i) the ground-state splitting to be servoed to the correct value as determined by known $g$-factors \cite{marx1998precise,knab1993experimental,hoffman2013radio} and $\Omega_\mathrm{rf}$, (ii) the clock laser to be maintained on line center, and (iii) the dressed-state splitting to be measured to a precision limited by the integration time.  Determination of the quadrupole moment would then be limited by the determination of the rf confinement potential.  This typically dominates over the dc contribution and could be assessed much more accurately than done here.   Measurement at the 0.1\% uncertainty should be achievable using this approach.

\section{Summary}
In this paper, the effects of an oscillating quadrupole field on atomic energy levels have been considered.  General expressions for the interaction matrix elements have been given and can be used to calculate effects for any given set up.  This work generalises the results given in \cite{ItanoQuad} for the first order quadrupole shift from a static field.  It also complements the recent discussion on ac magnetic field effects driven by the same trapping fields considered here \cite{gan2018oscillating}.  Although the quadrupole effects are small and not likely to limit clock performance, their possible influence on the assessment of ac magnetic fields should be considered if the levels involved support a quadrupole moment.

A proof-of-principle measurement of the quadrupole moment using the resonant coupling induced by the rf confinement has also been demonstrated.  Without any special magnetic field control an accuracy of $\sim3\%$ has been achieved.   Modest improvement in magnetic field control and a rigorous assessment of the trap rf confinement would significantly improve accuracy.  Other methods have utilised entangled states within decoherence free subspaces \cite{roos2006designer} or dynamic decoupling \cite{shaniv2016atomic}, both of which have achieved inaccuracies at the $\sim0.5\%$ level.  In any case one is limited by the size of the interaction and the ability to characterize the potential.  The method here utilizes the dominant coupling produced by the rf confinement, which is also less sensitive to stray fields.  Additionally, the method is technically easy to implement.

\begin{acknowledgements}
We thank Wayne Itano for suggesting the possibility of using the resonance condition $2\omega_z=\Omega_\mathrm{rf}$ to measure the quadrupole moment and bringing our attention to his earlier work. This work is supported by the National Research Foundation, Prime Ministers Office, Singapore and the Ministry of Education, Singapore under the Research Centres of Excellence programme. This work is also supported by A*STAR SERC 2015 Public Sector Research Funding (PSF) Grant (SERC Project No: 1521200080). T. R. Tan acknowledges support from the Lee Kuan Yew post-doctoral fellowship.
\end{acknowledgements}


\section{Introduction}

Social robots engaging in natural task-based dialogues with human
teammates must understand and generate natural
language expressions that refer to entities
such as people, locations, and objects~\cite{mavridis2015review,popescu1998reference}. These tasks, known as
\emph{reference resolution} and \emph{referring expression
  generation (REG)}, are particularly
challenging in realistic robotics applications due to the realities of
how knowledge is represented and distributed in modern robotic architectures.

We previously presented a \emph{Consultant Framework}~\cite{williams2017iib} that
allows a robot to use its distributed sources of knowledge during reference resolution~\cite{williams2016aaai}
and REG~\cite{williams2017inlg}, without requiring the language
processing system to understand how that knowledge is represented and accessed.
We've used this framework in
previous work to enable a modern take on the classic Incremental
Algorithm (IA)~\cite{dale1995computational} for REG, relaxing
several assumptions: that
knowledge is certain, that knowledge is centrally stored, and that
a list of all properties known to hold for each known entity is
centrally available during REG. Our
Consultant Framework allows these assumptions to be relaxed, producing
a REG algorithm tailored to the realities
of robotic architectures.
Domain independence, however, comes at a computational
cost, especially for language generation.

The IA requires, for each property that could be included,
consideration of whether it holds for the
to-be-described target and not for at least one
distractor. Under the assumptions of the IA, this can be performed via
set-membership checks on centrally available property sets. When
the assumption of such property sets is relaxed,
however, as is the case in the modified algorithm designed to leverage
our Consultant Framework, these considerations must instead be made through
queries to the Consultants responsible for the target and
distractors. The computational complexity of REG combined with the computational cost of these queries
results in a significant computational burden.

To address this computational burden, we propose(see also~\cite{williams2018mrhrcstmb}) an augmented
Consultant Framework that includes Consultant-Specific Short Term
Memory (STM) Buffers that cache a small number of properties recently
determined to hold for various entities.
We will begin by defining this augmented framework, and by describing how it
reduces the complexity of REG. We will
then discuss different possible assumptions that can be made in the
design of these STM Buffers, and discuss how these
different choices impact both efficiency and cognitive
plausibility. Next, we will discuss insights that can be gleaned from
psychological models of memory decay and forgetting and computational
caching strategies, and how these insights apply to the design of
these STM Buffers. Finally, we will discuss how these
Buffers can be exploited by processes beyond REG, and their potential relation to other cognitive models
maintained throughout the architecture.

\section{Augmented Framework}

Our previously presented Consultant Framework~\cite{williams2017inlg}
allows information about entities to be assessed when knowledge is
uncertain, heterogeneous, and
distributed, facilitating IA-inspired approaches to REG. Specifically, each
Consultant $c$ facilitates access to one KB\xspace $k$, and must
be capable of four functions:
\begin{small}
\begin{enumerate}
\item providing a set $c_{domain}$ of atomic entities from $k$,
\item advertising a list $c_{constraints}$ of constraints that can
be assessed with respect to entities from $c_{domain}$, \emph{and
that is ordered by descending
preference}.
\item assessing constraints from $c_{constraints}$ with respect to
entities from $c_{domain}$, and
\item adding, removing, or imposing constraints from $c_{constraints}$
on entities from $c_{domain}$.
\end{enumerate}
\end{small}
In this section, we define an \emph{(STM)-Augmented
  Consultant Framework} that adds an additional requirement:
\begin{small}
\begin{enumerate}
\setcounter{enumi}{4}
\item providing a list $c_{STM}$ of properties that hold for some
  entity from $c_{domain}$.
\end{enumerate}
\end{small}
Crucially, the properties returned through this capability do not need
to be all of the properties that hold for the target entity. A
Consultant may have a large number of properties that it could assess
for a given entity if need be, some of which might be very expensive
to compute. As such, the purpose of this capability is not to request
evaluation of all possible properties for the specified entity, but
rather to request the contents of a small cache of properties recently
determined to hold for the specified entity.

Models of Working Memory
suggest that humans maintain cached knowledge of
a small number of activated entities. While early  models of working
memory suggested that the size of working memory is bounded to a limited
\emph{number of chunks} (as in Miller's famous ``magical number'' of
seven, plus or minus two~\cite{miller1956magical}), more recent
models instead suggest that the size of working
memory is affected by the complexity of those chunk
~\cite{mathy2012s}. For
example, needing to maintain
multiple \emph{features} of a single entity may
detract
from the total number of maintainable entities, and
accordingly, the number
of features maintainable for other
entities~\cite{alvarez2004capacity,taylor2017does,oberauer2016limits}.
Moreover, recent research has suggested that humans may have different
resource limits for different \emph{types} of representations (e.g.,
visual vs. auditory~\cite{fougnie2015working}, or different types of
visual features~\cite{wang2017separate}) either due to the existence
of separate domain-specific cognitive
resources~\cite{baddeley1992working,logie2014visuo}
or do to decreased interference between disparate
representations~\cite{oberauer2012modeling}.

Drawing on these insights, the new capability required in the
\emph{STM-Augmented Consultant Framework} requires each Consultant to
maintain its own set of
\emph{features} currently remembered for the set of entities for which
it is responsible. This serves to allow fast access to a set of entity
properties likely to be relevant, in order to avoid the expensive
long-term memory queries that make processes such as referring
expression generation so expensive in the current Consultant
framework.
In the next section we describe how our newly proposed framework can
be used during the course of REG.

\section{Algorithmic Approach}

We now present \emph{SD-PIA}\xspace, the STM-Augmented variant of the
Distributed, Probabilistic
IA~\cite{williams2017inlg}. We will describe the main
differences between \emph{DIST-PIA} and \emph{SD-PIA}\xspace, the key difference being
our use of the properties stored in STM before
performing LTM-Query intensive operations.
While DIST-PIA crafted sub-descriptions through the use of a
single algorithm (DIST-PIA-H), \emph{SD-PIA}\xspace begins by crafting an
initially (possibly partial) sub-description using the
\emph{SD-PIA-STM-H} algorithm, which utilizes only the properties found
in STM Buffers. If the sub-descriptions returned
through this algorithm are not fully discriminating, the partial
sub-description is augmented by passing the set of still-to-be-eliminated distractors to
\emph{SD-PIA-H}, which operates much the same as the original
\emph{DIST-PIA-H} algorithm.

The other main difference between \emph{DIST-PIA} and \emph{SD-PIA}\xspace
is in the design of the \emph{SD-PIA-STM-H} function. Instead
of considering all properties advertised in the target's domain,
\emph{SD-PIA-STM-H} considers only the properties
returned by querying that Consultant's STM buffer, requiring a single
query rather than $O(c_m^{\Lambda})$ queries. For each of these
already-known-to-hold and already-bound queries,
\emph{SD-PIA-STM-H} iteratively rebinds the query to refer to
each distractor $x$ rather than the target entity. For each re-bound
query, \emph{SD-PIA-STM-H} calls  a function \emph{stm-apply},
which checks whether that property holds for that distractor ($x$), by
first checking whether the property exists in the STM
Buffer maintained by Consultant $c_x$ for $x$, or, if and only if this is
not the case, by checking whether the property is known to hold by
Consultant $c_x$ using its' $apply$ method, as usual.

\begin{figure}[ht]
\fbox{\parbox{\textwidth}{
\center{\textbf{Notation}}
\begin{scriptsize}
\begin{description}
\item [$C$] A set of \emph{Consultants} $\{c_0,\dots,c_n\}$
\item [$c_m^{\Lambda}$] The set of formulae
  $\{\lambda_0,\dots,\lambda_n\}$ advertised by Consultant $c$ responsible for $m$.
\item [$c_m^{\Lambda_{STM}}$] The STM buffer of formulae maintained by Consultant
  $c$ responsible for $m$.
\item [$M$] A robot's \emph{world model} of entities
  $\{m_0\ldots m_n\}$ found in the domains provided by $C$.
\item [$D$] The incrementally built up
  description, comprised of mappings from entities $M$ to sets of pairs
  $(\lambda,\Gamma)$ of formulae and bindings for those formulae.
\item [$D^M$] The set of entities $m\in M$ for which sub-descriptions
  have been created.
\item [$d^M$] The set of entities $m\in M$ involved in
  sub-description $d$.
\item [$P$]  The set of candidate $(\lambda,\Gamma)$ pairs under
  consideration for inclusion.
\item [$Q$] The queue of referents which must be described.
\item [$X$] The incrementally pruned set of distractors
\end{description}
\end{scriptsize}
}}
\end{figure}

\begin{algorithm}[!ht]\centering\scriptsize
\caption{$\textit{SD-PIA}(m,C)$}
\begin{algorithmic}[1]
\STATE{$D =$ new Map() // \textit{The Description}} \label{alg:init1}
\STATE{$Q =$ new Queue($m$) // \textit{The Referent Queue}} \label{alg:init2}
\WHILE{$Q\neq\emptyset$}
\STATE // \textit{Consider the next referent}
\STATE{$m\prime$ = pop(Q)}\label{alg:piapop}
\STATE// \textit{Craft a description $d$ for it}
\STATE{$(d,X)=\textit{SD-PIA-STM-H}(m\prime,C)$}\label{alg:pialoop1}
\STATE{$d=\textit{SD-PIA-H}(m\prime,C,X,d)$}\label{alg:pialoop1a}
\STATE{$D= D\cup \{m\rightarrow d\}$}
\STATE// \textit{Find all entities used in $d$}
\FORALL{$m\prime\prime\in {d}^M\setminus keys(D)$}\label{alg:enqueue1}
\STATE // \textit{And add undescribed entities to the queue}
\STATE{$push(Q, m\prime\prime)$}\label{alg:enqueue2}
\ENDFOR \label{alg:pialoop2}
\ENDWHILE
\RETURN{$D$}\label{piaret}
\end{algorithmic}
\label{alg:distpia}
\end{algorithm}
\begin{algorithm}[!ht]\centering\scriptsize
\caption{$\textit{SD-PIA-STM-H}(m,C)$}
\begin{algorithmic}[1]
\STATE{$d = \emptyset$ // \textit{The Sub-Description}}
\STATE{$X = M \setminus m$ // \textit{The Distractors}}\label{alg:stmh1-1}
\STATE{$P = order([\forall \lambda \in c_m^{\Lambda_{STM}}:
    (\lambda,\emptyset)], c_m^{\Lambda})$}\label{alg:stmh1-2}
\WHILE{$X\neq\emptyset$  and  $P\neq\emptyset$}
\STATE{$(\lambda,\Gamma)= pop(P)$}
\STATE{$\bar{X} = [x\in X \mid
    stm\_apply(c_x,\lambda,rebind(\Gamma,m\rightarrow x)) < \tau_{dph}]$}
\IF{$\bar{X}\neq\emptyset$}
\STATE{$d= d\cup (\lambda,\Gamma)$}\label{alg:stmh2}
\STATE{$X= X\setminus \bar{X}$}\label{alg:stmh3}
\ENDIF
\ENDWHILE
\RETURN{$(d,X)$}\label{alg:piah-ret}
\end{algorithmic}
\label{alg:stmh}
\end{algorithm}
\begin{algorithm}[!ht]\centering\scriptsize
\caption{$\textit{SD-PIA-H}(m,C,X,d)$}
\begin{algorithmic}[1]
\STATE{// \emph{Initialize a set of properties to consider: those
    advertised by the Consultant $c$ responsible for
    $m$ and not already part of the sub-description}}
\STATE{$P = [\forall \lambda \in c_m^{\Lambda}:
    (\lambda,\emptyset)] \setminus d$ }\label{alg:hinit2}
\STATE{// \emph{While there are distractors to eliminate or properties to consider}}
\WHILE{$X\neq\emptyset$  and  $P\neq\emptyset$} \label{alg:piah-startloop}
\STATE{$(\lambda,\Gamma)= pop(P)$}\label{alg:piahpop}
\STATE{// \emph{Find all unbound variables in the next property}}
\STATE{$V=find\_unbound(\lambda,\Gamma)$}\label{alg:piah-findunbound}
\IF{$\mid\!V\!\mid > 1$}\label{alg:piah-if1}
    \STATE{// \emph{If there's more than one, create copies under all possible variable bindings that leave one variable of the same type as the target unbound}}
\FORALL{$\Gamma\prime \in
  cross\_bindings(\lambda,\Gamma,C)$}\label{alg:piah-crossbindings}
\STATE{// \emph{And push them onto the property list}}
\STATE{$push(P,(\lambda,\Gamma\prime))$}\label{alg:piah-pushP}
\ENDFOR\label{alg:piah-if2}
    \STATE{// \emph{Otherwise, if sufficiently probable that the
    property applies to the target...}}
\ELSIF{$apply(c_m,\lambda,\Gamma\cup (v_0\rightarrow m)) >
  \tau_{dph}$}\label{alg:piah-else1}
    \STATE{// \emph{And sufficiently probable that it does
        \textbf{not} apply to at least one distractor...}}
\STATE{$\bar{X} = [x\in X \mid apply(c_x,\lambda,\Gamma\cup
    (v_0\rightarrow x)) < \tau_{dph}]$}
    \STATE{// \emph{Then bind its free variable to the target, and add it to the sub-description...}}
\IF{$\bar{X}\neq\emptyset$}
    \STATE{// \emph{And remove any eliminated distractors}}
\STATE{$d= d\cup (\lambda,\Gamma\cup (v_0\rightarrow m))$}
\STATE{$X= X\setminus \bar{X}$}\label{alg:assess2}
\ENDIF
\ENDIF\label{alg:piah-else2}
\ENDWHILE
\RETURN{$d$}\label{alg:piah-ret}
\end{algorithmic}
\label{alg:distpiahelper}
\end{algorithm}

\section{Demonstration}

We will now present a proof-of-concept demonstration of our
proposed algorithm, implemented in the ADE~\cite{scheutz2006ade} implementation of the DIARC
architecture~\cite{scheutz2018cognitive,schermerhorn2006diarc}
The
ADE (Agent Development Environment) middleware provides a well-validated infrastructure for enabling
agent architectures through parallel distributed processing.
The
Distributed Integrated Affect
Reflection Cognition (DIARC) Architecture is a component-based
architecture that has been under development for over 15 years,
with a focus on robust spoken language
understanding and generation. For our demonstration scenario, the
following architectural components were used:
Speech Recognition (using the Sphinx4 Speech
Recognizer~\cite{walker2004sphinx}), Parsing (which uses the most recent
iteration~\cite{scheutz2017spoken} of the TLDL Parser~\cite{dzifcaketal09icra}), the
Dialogue and Pragmatics
Components~\cite{briggs2013hybrid}
the NLG
Component (in which the \emph{SD-PIA}\xspace algorithm was implemented), the Goal Manager~\cite{schermerhorn2009utility}, the
Belief Component (which provides a Prolog Knowledge Base~\cite{clocksin2003programming}), the
Resolver Component~\cite{williams2016aaai}
the GROWLER HyperResolver Component~\cite{williams2018mrhrc:growler},
and a simulated Vision
Component~\cite{krauseetal14aaai}
(which
serves as a Consultant).

For this demonstration walkthrough, we use a simple scenario involving
a single ``objects Consultant'' (the aforementioned simulated Vision
Component), which advertises a variety of constraints, e.g.,
related to object type and object color, with
type constraints having higher preference than color constraints and ordered according to specificity. The scene in
front of the robot contains a red teabox (known to the objects
Consultant as $object_1$) and a green teabox (known to the objects
Consultant as $object_2$) sitting on
a table (known to the objects
Consultant as $object_3$).

For this walkthrough, we begin by instructing the simulated robot
``Look at the box''.
The TLDL Parser~\cite{scheutz2017spoken,dzifcaketal09icra} parses this
into an utterance of type \emph{Instruction}, with primary semantics
$lookat(self,X)$ and supplemental semantics $\{box(X)\}$.
The GROWLER reference resolution algorithm
described in our recent work~\cite{williams2018mrhrc:growler} (see
also~\cite{williams2016hri,williams2018oxford}), then identifies
the two teaboxes $(object_1, object_2)$, as candidate referents
satisfying the given description. During the reference resolution process, when the
property $box(X)$ is determined to hold for each entity, it is placed
into that entity's STM Buffer within the simulated
Vision Component. Because the expression is ambiguous, a clarification
request is automatically generated~\cite{williams2017rss} to determine
whether $object_1$ or $object_2$ is the target referent. For each of
these entities, \emph{SD-PIA}\xspace is recruited to generate referring
expressions. In this section, we will describe the process followed in
the selection of properties for $object_1$ alone (hereafter $o_1$), as
the process for $object_2$ is identical in structure.

\emph{SD-PIA}\xspace begins by creating empty description $D = \emptyset$ and
referent queue
$Q =\{o_1\}$ (Alg.~\ref{alg:distpia}, Lines~\ref{alg:init1}-~\ref{alg:init2}).
Because there are still referents to describe (Line~\ref{alg:piapop}), \emph{SD-PIA}\xspace calls helper
function \emph{SD-PIA-STM-H} (\emph{STM-H} hereafter) to craft a sub-description for $o_1$, which is popped
off of $Q$ (Line~\ref{alg:pialoop1}).

\emph{STM-H} begins by asking the Consultant responsible for $o_1$ for a set of
distractors $X$ (e.g., $\{o_2,o_3\}$)
and the set of properties $P$ stored in its STM Buffer
for $o_1$, sorted by that Consultant's preference ordering
$c^{\Lambda}_{m}$.
(Alg.~\ref{alg:stmh} Lines~\ref{alg:stmh1-1}-\ref{alg:stmh1-2}), in this
case $box(X)$

Next, \emph{STM-H} constructs the reduced set of distractors
$\bar{X}$ for which the property does \emph{not} appear in STM (i.e.,
$o_3$). Because this is nonempty, $o_3$ is removed from the set of
distractors,
and $box(o_1)$ is added
to sub-description $d$
(Alg.~\ref{alg:stmh} Lines~\ref{alg:stmh2}-~\ref{alg:stmh3}).
Because there are no more properties to examine in $P$,
sub-description $d$ and the set of remaining distractors $\{o_2\}$ is
returned.

The second helper function, \emph{SD-PIA-H} (Alg.~\ref{alg:distpiahelper},
hereafter simply \emph{HELPER}), is
then used to complete the referring expression. \emph{HELPER}
begins by asking the Consultant responsible for $o_1$ for the set of
properties $P$ it can use in descriptions, sorted according to its predetermined
preference ordering, and ignoring properties already contained in
sub-description $d$, e.g.,
{teabox(X), table(X), red(X), green(X), on(X,Y)}
(Alg.~\ref{alg:distpiahelper} Line~\ref{alg:hinit2}).

From this list, \emph{HELPER} pops the first unconsidered property
(i.e., $teabox(X)$) and its (empty) set of bindings.
$teabox(X)$ has
exactly one unbound variable, so \emph{HELPER} will use
Consultant $o\text{'s}$ $apply$ method (as per Capability 3)
to ask how probable it is that $teabox(X)$ applies to $o_1$
(Alg.~\ref{alg:distpiahelper} Line~\ref{alg:piah-else1}).
Because it is sufficiently probable that this property applies to this
entity,
\emph{HELPER} uses the same method to determine whether it also
applies to the single remaining distractor ($o_2$). Because it does,
the property will be ignored.

\emph{HELPER} will then repeat this process with other properties.
Suppose it is insufficiently probable that $table(X)$ holds:
it will be ignored.
Suppose it \emph{is} sufficiently probable that $red(X)$ holds
but not for the lone
remaining distractor ($o_2$), allowing $o_2$ to be ruled out.
Thus, $\{o_2\}$ will be
removed from $X$
and
$red(o_1)$ will
be added to  $d$
Since $X$ is now empty,
the sub-description $\{(box(o_1), red(o_1)\}$ will be
returned to \emph{SD-PIA}\xspace (Line~\ref{alg:piah-ret}) and added to
full description D.
Since this
sub-description does not refer to any entities that have yet to be
described and $Q$ is empty, \emph{SD-PIA}\xspace will
return description $D$
(Algorithm~\ref{alg:distpia}, Line~\ref{piaret}).
This process is then repeated for object $o_2$.
It will be the responsibility of the
next component of the natural language pipeline to translate this into
an RE, e.g. ``Do you mean the red box or the green box?''~\cite{williams2017rss}.

\section{Discussion}

\textbf{Potential Benefits:}
The primary motivation behind
our approach is performance: the number of queries needed
when determining what properties to use may be much lower
when those properties are sufficiently
discriminating. Similarly, determining whether properties
rule out distractors may be possible using set-membership checks
rather than costly long term memory queries.
Moreover, we believe these buffers may
facilitate \emph{lexical
  entrainment}~\cite{brennan1996lexical,brennan1996conceptual}, where
conversational partners converge on common choices of labels and
properties over the course of a conversation, resulting in more
comprehensible referring expressions~\cite{tolins2017overhearing}.
If a robot's STM Buffers are populated with properties used by itself and
its interlocutors, and if the properties contained in those buffers
are considered before others, this may directly lead to such entrainment.

\noindent\textbf{Potential Limitations:}
On the other hand, because the robot arbitrarily restricts itself to a
subset of the properties it \emph{could} otherwise choose to use, it
may force the robot into local maxima in the landscape of
referring expressions. Moreover, the robot runs the risk of using a
property that does not actually hold if it does not appropriately
handle contextual dynamics. For example, an object previously
described as ``on the left'' may no longer be ``on the left'' if the
object, robot, or interlocutor has moved since the object was last
discussed.

\noindent\textbf{Design Decisions: Buffer Size Limitations:}
Many insights from psychology could be leveraged to prevent such mistakes. A
context-sensitive decay-based model of working memory might prevent
this by having different properties ``decay'' out of cache, with time or
probability of decay proportional to how
likely it is to change over
time~\cite{baddeley1975word,schweickert1986short}. A resource-based
model might prevent this by having a limited total buffer size, and
have property dynamics factor into the decision of what to bump from
memory when new things need to be inserted into an already-full
buffer~\cite{just1992capacity,ma2014changing}
Finally,
an interference-based model might prevent this by having
properties added to a buffer ``overwrite'' the most similar property
currently in the
buffer~\cite{oberauer2006formal,saito2004nature}.
These are loose characterizations of the respective theories
from cognitive psychology; a comprehensive discussion of these
theories and the relative evidence for them from a psychological
perspective can be found in~\cite{oberauer2016limits}.
Of course, the approach taken need not be cognitively plausible. The
robot could, for example, statistically model the dynamics of
different properties, and use them to periodically re-sample the
properties held in its buffers.

The question of cognitive plausibility also raises a different
question: how extensive should the robot's memory caches be? Should
the robot keep property caches for all entities, for only those that
are relevant in the current context, or for an even smaller set? And
for each entity, should the robot track all relevant knowledge for so
long as that entity is tracked, or should it track only a fixed, small
number of properties? And should such limits be local, or global
limits shared between tracked entities? These are once again questions
for which candidate answers can be gleaned from the psychological
literature~\cite{oberauer2016limits}. Here, interesting tradeoffs can
be made. On the one hand, robots can be made to remember much more
than humans can. On the other hand, expanded memory may come at a
computational cost; and moreover, choosing to remember more means
increased risk of incorrect behavior due to mishandling of property
dynamics. Further evidence from neuroimaging studies suggests that the
contents of working memory in humans is biased by humans' current
goals, with only task-relevant features being maintained in visual working
memory~\cite{yu2017occipital}. For robots, task-relevance may be
similarly useful for optimally selecting what to maintain in
Consultants' STM Buffers.

\noindent\textbf{Design Decisions: Buffer Population:}
Similar tradeoffs arise when deciding when to add properties
used in natural language to a robot's STM Buffers. In this work,
properties are added to buffers as soon as they are determined to hold
for a referent,
rather than
waiting until the end of the reference resolution process.
This
means that lexical entrainment effects may be seen for
entities other than intended referents. For example, consider
``the tall red box''. Assuming properties are
processed in the order $tall(X)$, $red(x)$, $box(X)$, all tall
objects in the scene will have $tall(X)$ added to their STM Buffers,
all tall red objects will also have $red(X)$ added to their STM
Buffers, and tall red boxes will have all three properties added to
their STM Buffers. Accordingly, the robot will prefer to use height
and potentially color and shape to refer to other object
even if they have not been referred to. This is not dissimilar from
psycholinguistic observation
of syntactic and semantic carry-over
from previous object references to
references to previously
unmentioned
entities~\cite{goudbeek2012alignment,carbary2011conceptual}
This could be particularly effective in the
case of the Vision Consultant, as additional caching reduces the risk
of needing to conduct future (potentially expensive) visual
searches. If this particular memory-performance tradeoff is not
optimal for Consultants associated with non-visual modalities, the
decision to add properties to STM Buffers may need to be made on a
per-Consultant basis.

\section{Conclusions}

We have presented a caching strategy augmenting a
robot's set of distributed knowledge sources with cognitively
inspired STM Buffers so as to increase computational
efficiency. We have explained how these buffers may facilitate linguistic
phenomena such as lexical entrainment, and identified insights from
cognitive science that may inform future
refinements of these Buffers. Two tasks will be
crucial for future research building off this work. First, the
presented approach must be evaluated both in terms of computational
performance and with respect to objective and subjective
measures such as those used in our previously presented evaluative
approach~\cite{williams2017inlg}. Second, insights from cognitive
science must be leveraged to enable alternate design decisions that may be explored
both from the perspectives of artificial intelligence for human-robot
interaction, cognitive modeling,
and cognitive architecture.
\vspace*{-3mm}
\subsection*{Acknowledgments}
\vspace*{-2mm}
\begin{small}
This work was in part supported by ONR grant N00014-16-1-0278.
\end{small}
\vspace*{-3mm}
\bibliographystyle{splncs04}
\def\footnotesize{\footnotesize}


\section{Introduction}

The LHC has confirmed that the Standard Model (SM) describes the electroweak (EW) scale very well and the existence of a Higgs-like particle, which couples following the SM predictions. Until now the experiments have not found evidences of new physics (NP): this mass gap between the EW and possible NP scales allows us to use effective field theories (EFTs) in order to analyze systematically the imprints of possible high-energy fields at low energies.

In EFTs the information about high energies is encoded in the low-energy constants (LECs). However, the information about low energies is described by the local operators. If the LECs are free parameters, the framework is model-independent but for some well-motivated assumptions (particle content, symmetries and power counting). The Higgs can be incorporated in two different ways: either by assuming that it forms an infrared doublet structure with the three Goldstone bosons of the EW symmetry breaking (EWSB) or without assuming any specific relation between them. The first one corresponds to the linear realization of the EWSB, usually called SM effective field theory (SMEFT). The second one, called EW effective theory (EWET), EW chiral Lagrangian (EWChL) or Higgs effective theory (HEFT), is a more general (non-linear) realization of the EWSB, where strongly-coupled scenarios are usually considered, and it is the one we follow in this work.

At high energies the resonances can be incorporated by using a phenomenological Lagrangian which respects the EWSB pattern implemented in the SM, being this the main assumption of our approach. Integrating out these NP states, one recovers the EWET Lagrangian with its LECs given in terms of resonance parameters. Then, by fitting the LECs to experimental data, one can get the {\it imprints} of the fundamental EW Theory, the main aim of this kind of analysis. In Refs.~\cite{Pich:2015kwa,Pich:2016lew} we analyzed the {\it imprints} coming from colorless bosonic resonances and in Ref.~\cite{Krause:2018cwe} we enlarge the analysis to colored resonances, both of bosonic and fermionic kind.

\section{Low energies: the electroweak effective theory}

As pointed out previously, at low energies we use the EWET Lagrangian. The construction of the Lagrangian can be found in Ref.~\cite{Krause:2018cwe}, but we try to summarize them here:
\begin{enumerate}
\item Particle content: we consider the particle content of the SM. The Higgs is included as a scalar singlet with $m_h=125\,$GeV and for simplicity only a generation of fermions is included.
\item Symmetries: we assume the EWSB pattern, {\it i.e.}, $\mathcal{G}\equiv SU(2)_L\otimes SU(2)_R \rightarrow \mathcal{H}\equiv SU(2)_{L+R}$. The remaining symmetry $\mathcal{H}$ is called ``custodial'' symmetry, because it protects the ratio of the $W$ and $Z$ masses from receiving large corrections.
\item Power counting: we consider a low-energy expansion in powers of generalized momenta: $\mathcal{L}_{\mathrm{EWET}} = \mathcal{L}_{\mathrm{EWET}}^{(2)}+\mathcal{L}_{\mathrm{EWET}}^{(4)} +\dots\,$. Note that the operators are not ordered following their canonical dimensions (as it occurs in the SMEFT), but according to their chiral dimension, which reflects their infrared behavior at low momenta. There are two main differences comparing to previous works \cite{Buchalla:2013eza,Longhitano:1980iz}. Firstly, and assuming that the SM fermion are weakly coupled to the strong beyond-the-SM sector, we assign an $\mathcal{O}(p^2)$ to fermion bilinears. Secondly, assuming that no strong breaking of the custodial symmetry occurs, we assign an $\mathcal{O}(p)$ to the explicit breaking of this symmetry. Both suppressions are consistent with the phenomenology.
 \end{enumerate}

The next-to-leading order (NLO) Lagrangian can be organized by taking into account the parity ($P$) of the operators and the number of fermion bilinears~\cite{Krause:2018cwe}:
\begin{equation}
  \label{eq:L-NLO}
\mathcal{L}_{\mathrm{EWET}}^{(4)}  =
\sum_{i=1}^{12} \mathcal{F}_i\; \mathcal{O}_i  + \sum_{i=1}^{3}\widetilde{\mathcal{F}}_i\; \widetilde{\mathcal{O}}_i
 +  \sum_{i=1}^{  8  } \mathcal{F}_i^{\psi^2}\; \mathcal{O}_i^{\psi^2}  + \sum_{i=1}^{  3   } \widetilde{\mathcal{F}}_i^{\psi^2}\; \widetilde{\mathcal{O}}_i^{\psi^2}
 + \sum_{i=1}^{10}\mathcal{F}_i^{\psi^4}\; \mathcal{O}_i^{\psi^4}  + \sum_{i=1}^{2}\widetilde{\mathcal{F}}_i^{\psi^4}\; \widetilde{\mathcal{O}}_i^{\psi^4}  ,
\end{equation}
where operators without (with) tilde refer to $P$-even ($P$-odd) ones and where we split the Lagrangian into bosonic, two-fermion and four-fermions operators, respectively.

\section{High energies: the resonance effective theory}

At high energies we consider the particle content of the SM plus bosonic fields with $J^P=0^\pm$ and $J^P=1^\pm$ (in electroweak triplets or singlets and in QCD octets or singlets) and fermionic states with $J=\frac{1}{2}$ (in electroweak doublets and in QCD triplets or singlets). Although the power counting explained in the previous section is not directly applicable here, a consistent organization can be followed by taking into account the integration of the resonances (in general $R\propto1/M_R^2$ and $\Psi\propto1/M_\Psi$ for the classical solution of the bosonic and fermionic resonances) and the additional suppression in case of fermionic resonances due to their weak coupling: only operators up to one resonance field and constructed with chiral operators of $\mathcal{O}(p^2)$ or lower are required.

Once the resonance Lagrangian is set, the heavy resonances can be integrated out and the result can be organized in powers of momenta over the resonance masses. This procedure is standard in the context of EFT and allows us to determine the LECs of the NLO EWET Lagrangian in terms of resonance parameters, {\it i.e.}, $\mathcal{F}_i,\,\widetilde{\mathcal{F}}_i,\,\mathcal{F}_i^{\psi^2}, \widetilde{\mathcal{F}}_i^{\psi^2},\,\mathcal{F}_i^{\psi^4}$ and $\widetilde{\mathcal{F}}_i^{\psi^4}$ in (\ref{eq:L-NLO}) in terms of resonance couplings and masses~\cite{Pich:2015kwa,Pich:2016lew,Krause:2018cwe}.

As a first approach we studied in Ref.~\cite{Pich:2015kwa} the contributions to the LECs of $P$-even purely bosonic $\mathcal{O}(p^4)$ operators from $P$-even bosonic colorless resonance exchanges (without considering an explicit breaking of the custodial symmetry), once some short-distance constraints were taken into consideration, what allowed us to get predictions in terms of only a few resonance parameters. In Ref.~\cite{Pich:2016lew} we expanded our analyses to include bosonic and fermionic $\mathcal{O}(p^4)$ LECs from bosonic colorless resonance exchanges. Finally, in Ref.~\cite{Krause:2018cwe} we consider gluons, color octet fermion bilinears and fermionic resonances. In the future we plan to include more than one generation of quarks and/or leptons.

\section{Phenomenology}

In this section we try to glimpse the scale of the heavy states. The effects of vector and axial-vector resonances on the $S$ and $T$ parameters~\cite{Peskin:1990zt} were studied in Ref.~\cite{Pich:2012jv}, including NLO corrections. Current experimental bounds on these parameters and the requirement of a good high-energy behavior of the high-energy theory push the masses of the vector and axial-vector resonances to the TeV range~\cite{Pich:2015kwa,Pich:2012jv}. Note that possible scalar, pseudoscalar and fermion resonance contributions have not been considered yet.

New interaction vertices as the ones of (\ref{eq:L-NLO}) have been analyzed in the literature: standard dijet and dilepton studies at LHC and LEP have searched for four-fermion operators containing light leptons and/or quarks~\cite{LHC_LEP}. In these analyses, the four-fermion LECs are usually expressed in terms of a suppression scale $\Lambda$ defined through $|\mathcal{F}^{\psi^4}_j| = 2\pi/\Lambda^2$. Currently, the most stringent (95\% CL) lower limits on this scale are:%
\begin{enumerate}
\item From dijet production~\cite{LHC_LEP}: $\Lambda\geq 21.8$~TeV from ATLAS, $\Lambda\geq 18.6$~TeV from CMS and $\Lambda\geq 16.2$~TeV from LEP.
\item From dilepton production~\cite{LHC_LEP}: $\Lambda\geq 26.3$~TeV from ATLAS, $\Lambda\geq 19.0$~TeV from CMS and $\Lambda\geq 24.6$~TeV from LEP.
\end{enumerate}
The previous bounds refer to four-fermion operators with the first and second generation of quarks. Some studies on four-fermion operators including top and bottom quarks can also be found~\cite{top_bottom}:
\begin{enumerate}
\item From high-energy collider studies~\cite{top_bottom}: $\Lambda\geq 1.5$~TeV from multi-top production at LHC and Tevatron, $\Lambda\geq 2.3$~TeV from $t$ and $t\bar{t}$ production at LHC and Tevatron and $\Lambda\geq 4.7$~TeV from dilepton production at LHC.
\item From low-energy studies~\cite{top_bottom}: $\Lambda\geq 14.5$~TeV from $B_s-\overline{B}_s$ mixing and  $\Lambda\geq 3.3$~TeV from semileptonic B decays.
\end{enumerate}