\section{Introduction}
The rapid maturation of the InAs self-assembled quantum dot (QD) platform, and in particular the ability to interface these emitters with high quality nanophotonic structures,~\cite{Lodahl2015} has opened up viable routes towards the creation of integrated single-photon sources~\cite{Shields2007} for quantum network applications.~\cite{Borregaard2018a, Lodahl2018}  This increasing viability of QD-based photonic technology can be traced to three milestones in the field: the growth of high quality QDs via the Stranski-Krastanov technique,~\cite{Petroff2001} the ability to couple emission from QDs to photonic modes with near-unity efficiency,~\cite{Arcari2014, Ding2016} and the use of doped heterostructures to charge stabilize the environment of the emitters.~\cite{Kuhlmann2015, Lobl2017}  Altogether, these allow for efficient and highly coherent light-matter interactions~\cite{Lobl2017, Thyrrestrup2018, Turschmann2019} and the generation of highly-indistinguishable photons,~\cite{Kirsanske2017, He2013} which are basic capabilities of quantum-photonic processing elements.

To date, the vast majority of QD-based devices are fabricated with no \emph{a priori} spatial or spectral knowledge about the emitters. This lack of information results in low yields when QDs are interfaced with nanoscale or dispersive elements such as waveguides or resonators, precluding the scaling up of these systems into complex architectures.  Furthermore, without prior knowledge of the QD properties, it has not been possible to quantify the effects of nanofabrication techniques on individual emitters.

In order to address these issues, a variety of techniques have recently been developed. Although differing in the specific strategies, they all present two main steps: first, the QDs are located in bulk samples; then photonic structures are deterministically fabricated about the detected positions. Interestingly, most of the reported works have primarily been concerned with improving the precision $\delta$ with which the emitters are located, whereas it is the final QD-nanostructure misalignment $\Delta$ that affects the performances of the fabricated devices, especially in those where the electromagnetic field is strongly confined and varies spatially. For photonic crystal waveguides, for example, the relevant length scale is the Bragg wavelength inside the medium. This corresponds to an effective QD emission wavelength in the medium of $\lambda/2n\approx130~\text{nm}$ for a typical QD emission wavelength of $910\text{~nm}$ and refractive index $n\approx3.5$. In more quantitative terms, an alignment precision of $50\text{~nm}$ in a photonic-crystal waveguide implies that a coupling efficiency~$\beta\ge~96\%$ can be achieved deterministically.~\cite{Javadi2017}

One approach is to use \emph{in-situ} techniques, where cathodoluminescence (CL)~\cite{Gschrey2013, Gschrey2015, Kaganskiy2015} or micro-photoluminescence ($\mu$PL)~\cite{Dousse2009, Sartison2017} spectroscopy first locates the QDs followed by electron-beam or photolithography to pattern the photonic elements.  With CL, QDs were positioned within a nanoscale multimode beam-splitter, with a QD-nanostructure misalignment of only $\Delta$~=~34 nm,~\cite{Schnauber2018} while photolithography defines structures with micron dimensions and therefore does not require the same degree of accuracy.

An alternative approach is to first locate the QDs relative to alignment markers, using either scanning electron microscopy~\cite{Badolato2005} or $\mu$PL,~\cite{Thon2009, Kojima2013, Sapienza2015, Coles2016} then fabricate structures in a separate step.  Separating the localization and nanofabrication has the distinct advantage of parallelizing the deterministic nanofabrication procedure and is therefore more compatible with the design of time-intensive, complex lithography masks that contain many elements. The images taken in these protocols contain both the \emph{emission} from the QDs and the \emph{reflection} from the alignment markers, yielding typical localization precision of $\delta<$ 10 nm.~\cite{Liu2016, He2017}  The reflected image, however, depends on the excitation angle, while the emission pattern from the QDs does not.  Hence, slight misalignment of the excitation beam introduces alignment errors, which are reflected in the much-larger QD-nanostructure misalignments $\Delta$ found. For example, in the case of photonic crystal cavities in strong coupling regime,~\cite{Thon2009,Kojima2013} final QD-nanostructure misalignment of the order of $\Delta\approx50$~nm has been determined by comparing the measured coupling constant with the maximum calculated value. In another example, misalignments $\Delta$ between 50 and 250 nm in circular Bragg gratings have, instead, been inferred from simulations.~\cite{Sapienza2015} Finally, for other devices, such as micropillars, that have been deterministically integrated with QDs, no value of $\Delta$ has been reported; in these cases, the device diameter - typically up to a few $\mu$m's large~\cite{Liu2016a, He2017} - places an upper bound on the misalignment $\Delta$. Furthermore, the lack of a systematic study of these misalignments means that it is not possible to determine whether the errors arise due to optical measurements or the subsequent nanofabrication.

In contrast, we present the first quantitative and statistical study of the alignment of pre-located QDs to nanoscale photonic waveguides, using a straightforward improvement to the existing $\mu$PL protocols. Our method results in a systematic misalignment of 9 and 1 nm, randomly distributed with standard deviations of 46 and 33 nm, for samples where the QDs cannot and can be electrically controlled, respectively. We furthermore study the effect of fabricating quasi-one-dimensional nanophotonic waveguides or two-dimensional photonic-crystal waveguides (PhCWs) on the spectral response of the QDs, and on the different exciton complexes.

\section{Prelocalization of quantum dots}
In this work we set out to achieve a final QD-nanostructures misalignment $\Delta< 50$~nm. To do so we take the following steps: (i) Fabrication of a grid of alignment markers on top of a wafer containing QDs; (ii) Localization of QDs within each grid square and measurement of the spectral properties; (iii) Fabrication of nanostructures at preselected positions. To localize the QDs, in step (ii), we modify the protocol of \textcite{Liu2016} in a manner that yields the desired final accuracy.  We use only photoluminescence, and not reflection, to image both the alignment markers and the QDs.

Our global coordinate frame is set by a grid of gold crosses, which we fabricate on top of a GaAs membrane with embedded InAs QDs, as shown in Fig.~\ref{fig:f1_concept}a.  In this study, we use two types of wafers: the QDs are embedded either within an undoped GaAs membrane that is 160-nm thick, or within a p-i-n diode.~\cite{Kirsanske2017} In either case, each square within the grid is 40~$\mu$m by 40~$\mu$m and is identified by a binary label (set of small gold rectangles fabricated with different orientations).  We also fabricate a grid of solid gold lines that we use to quantify and correct for the rotation of our images (not shown).
\begin{figure}
\begin{center}
\includegraphics[width=8.4cm]{./Fig1.pdf}
\caption{Prelocalization protocol for epitaxially grown QDs (real data shown). (a) I: False color SEM of the GaAs membrane with embedded InAs QDs, with a gold alignment mask of crosses. II: First the alignment mask is imaged and the crosses located, using the photoluminescence of the membrane, as discussed in the main text. III: The QD photoluminescence is imaged and spatially correlated with the cross positions. As example, we point to several QDs. IV: Closed-up image of the emission pattern of a single QD.  All scalebars are 10~$\mu$m in length, except for IV, where it is 500~nm long.  Energy levels of the GaAs membrane (b) and embedded QD and wetting layer WL~(c).  In both cases, above band illumination (green arrow) and subsequent fast, non-radiative decay (black arrows) excites an electron (black symbol) to the conduction band, leaving a hole (white symbol) in the valance band of the GaAs or QD. Recombination of the electron and hole results in the emission of a photon, whose wavelength is typically near 830 - 850~nm and 930~nm for the membrane and QDs (light and dark red arrows, respectively).}
\label{fig:f1_concept}
\end{center}
\end{figure}

We locate the position of the QDs within each square of the grid in two steps, first imaging the crosses and then finding the QDs, all at a cryogenic temperature of about 10 K. Examples of these two images are shown in panels II and III of Fig.~\ref{fig:f1_concept}a. Although the excitation scheme does not change -- namely we use above band excitation at 780 nm, illuminating in widefield configuration an area slightly larger then the square -- our imaging protocol depends on the type of wafer used.  In either case we image the reference markers and the QDs separately, using emission from the sample in both cases, and not via the reflected laser light.  Consequently, no alignment errors are introduced due to slight angles of the excitation beam.  This improvement simplifies the measurement, and, as we show below, decreases the final misalignment between the QDs and nanostructures below previously reported values.

For the intrinsic sample, we use an 800 nm long-pass filter to block the reflected laser light, using the luminescence of the GaAs membrane to image our reference markers (using an Andor iKon-M CCD camera). As shown in Fig.~\ref{fig:f1_concept}a, panel II, the gold markers block the light emitted by the GaAs and therefore appear as shadows in the resultant image.  By fitting a line to each arm of the crosses, we find their centers, typically with an accuracy of 3.1 nm that is largely determined by the signal-to-noise ratio of the measurement. This value is far below the diffraction limit of the setup, and is typical of what is reported in the literature.~\cite{Liu2016}

Taking separate images of the alignment markers and QDs has an additional advantage. To locate the QDs, a narrowband filter $\left(935\text{~nm}\pm0.5\text{~nm}\right)$ is placed in the collection path, blocking the emission from the GaAs, resulting in background-free images that contain 10-20 well-separated QDs, as shown in panel III of Fig.~\ref{fig:f1_concept}a. We then fit a two-dimensional Gaussian to each QD, finding its location to within 0.6 nm that, due to the higher signal to background ratio, is three times smaller than the value reported in current state-of-the-art literature.~\cite{Liu2016} Assuming that our field-of-view is unchanged between these two images, we find the position of each QD relative to the global reference frame with an accuracy $\delta~=~4.9$~nm that is dominated by the uncertainty in the cross position.

The ability to electrically control the optical properties of the QDs on the gated sample allows us to further improve the localization protocol, a change that ultimately leads to better QD-structure alignment accuracy (see Sec.~\ref{sec:integration}).  Here, the QDs are embedded in a diode with a large built-in field, meaning that the energy levels are strongly tilted relative to those of Fig.~\ref{fig:f1_concept}c.  Consequently, in this natural state (i.e. with no applied bias voltage) the excited electrons quickly tunnel out of the QD, and no emission is observed.  Conversely, we can `turn on' the QDs by applying a bias voltage to recover the configuration of Fig.~\ref{fig:f1_concept}c.~\cite{Fry2000a} This electrical control allows imaging both the crosses and the QDs independently, without changing filters but rather by tuning the applied voltage, ensuring that our field-of-view is constant.  To do so, a 900 nm long-pass filter is placed in the collection path, blocking the relatively strong emission from the GaAs, which would otherwise swamp the signal from the QDs.  Instead, we use the tail end of the emission from the wetting layer to image the crosses with the QDs `off', when we do not apply a bias voltage. In these images we find the position of the center of each cross with an accuracy of 5.5 nm.  We then apply 500~mV to turn on the QD emission, which then dominates over the wetting layer fluorescence. The resultant image can be used to localize the emitters' positions to within 0.7 nm.  As before, by correlating the two images we find the absolute position of each QD with an accuracy $\delta~=~9.2$~nm. This value is larger than the one measured for the intrinsic sample due to a larger signal-to-background ratio, which is caused by the dimmer signal collected from the wetting layer. Nonetheless, we note that this value, which is consistent with earlier reports,~\cite{Liu2016, He2017} is below the level of overlay accuracy ($\pm15~\text{nm}$) that our e-beam lithography system (Elionix ELS-F125) can achieve.

After localization, and if desired, additional measurements can be made using pre-selected QDs.  Here, for example, we switch to a confocal setup, where we can excite each QD individually and record its emission spectrum (see Sec.~\ref{sec:Effects} below).  Similarly, the lifetime or single-photon purity of each emitter can be quantified before fabrication.

\section{Deterministic integration of quantum dots into nanophotonic waveguides}\label{sec:integration}
The important figure-of-merit for the deterministic integration of solid-state emitters into nanophotonic elements is not the precision $\delta$ with which the emitters are located relative to a reference frame, but rather the final misalignment $\Delta$ between the emitters and the nanostructures.  We therefore fabricate suspended nanophotonic waveguides~\cite{Midolo2015} at the predetermined positions of selected QDs, as shown in Fig.~\ref{fig:f2_misalignment}a, making both quasi-one-dimensional nanoguides and two-dimensional PhCWs. The nanoguides have a rectangular cross-sections with widths ranging from ($288~\pm2$) to ($631\pm2$) nm, as measured from SEM images of the devices.  The PhCWs are created by removing a row of holes from photonic crystals with lattice constants ranging from 233 nm to 247 nm and hole radii ranging from 71 nm to 76 nm, and are fabricated with QDs at different positions within the photonic crystal unit cell (i.e. distances to the nearest surface), as we discuss below.
\begin{figure}
\begin{center}
\includegraphics[width=8.4cm]{./Fig2.pdf}
\caption{Nanophotonic waveguides fabricated about pre-located QDs. (a) A representative area of the resultant photonic chips with both nanoguides and photonic crystal waveguides containing QDs (see inset, scalebars are both 2~$\mu$m). (b) Measured misalignment distribution between the QDs and the center of a nanoguide for the intrinsic sample.  The mean and standard deviation are given. The inset shows a false-color $\mu$PL image where the edges and center of the nanoguide are marked by black and green dashed lines, respectively, the QD emission is shown in blue with the center denoted by the red dot, and the relative misalignment is indicated by $\Delta$. (c) Same as in (b) but for the doped sample.  The smaller misalignment spread in (c) is attributed to the removal of the bandpass filter used in the localization of the QDs on the undoped sample, which ensures that both the QD and reference images are taken with the exact same field of view.}
\label{fig:f2_misalignment}
\end{center}
\end{figure}

Micro-photoluminescence measurements on the waveguides after fabrication allow us to determine whether they contain the targeted QD and to subsequently quantify the misalignment $\Delta$ between the emitters and waveguides. The yield of the undoped sample, which contains 48 nanoguides and 50 PhCWs is $96\%$ and $92\%$ for the two types of structures, respectively. Here, the yield represents the fraction of waveguides that integrate the correct pre-selected QD, as determined by a cross-correlation study between the QD emission spectra collected before and after fabrication. In contrast, the yield of the doped sample is $93\%$ and $74\%$ for the nanoguides and PhCWs, respectively.  To understand the low yield of the doped PhCW structures we further break down the data by target distance of the QDs from the nearest surface, finding a yield of $94\%$ when this distance is $\geq 100$~nm but only $44\%$ for distances $< 100$~nm. In contrast, for the undoped sample, the yield was $80\%$ for distances $< 100$~nm, despite having a relatively higher misalignment, as we show below.  We can understand this difference as follows: The area near a lateral surface -- in our case the holes of the PhCW -- is known to have a reduced electrical conductivity due to a local depletion of the free carriers.~\cite{Berrier2007}  Hence we are unable to properly apply a bias voltage to QDs that are located in these regions, in contrast to QDs at similar separations from the hole surface in the undoped sample (which are always `on').  Regardless, we note that for both types of samples we succeeded in observing emission from QDs nominally positioned within about 30~nm of a hole edge.

The actual misalignment $\Delta$ between QD and nanostructure for each sample was quantified from images of the photoluminescence from the nanoguides, as shown in the inset to Fig.~\ref{fig:f2_misalignment}b.  In these images, the features of the nanostructures, whose width is below the resolution of our optical system, appear as three Gaussian peaks (see Fig.~\ref{fig:f9_fitWg} and Appendix~\ref{sec:Loc_Wgs} for further details). We estimate the center of the waveguide, marked with a green dashed line in the inset to Fig.~\ref{fig:f2_misalignment}b, from the fitted position of the central Gaussian.  Similarly, we find the position of the QD using a two-dimensional Airy function (center denoted by the red dot in Fig.~\ref{fig:f2_misalignment}), allowing to quantify the final misalignment $\Delta$ between the two.  A histogram of $\Delta$ for QDs embedded in the nanoguides on the intrinsic wafer is shown in Fig.~\ref{fig:f2_misalignment}b, along with the fitted normal distribution, from which we find a misalignment $\Delta~=~(9\pm 46$) nm.~\footnote{For comparison, using reflected light to image the alignment markers resulted in a misalignment of ($-3\pm 169$)~nm}  We attribute the slight mean misalignment of 9 nm to a rigid shift introduced during the nanofabrication, which is within the 15 nm layer alignment accuracy of the electron beam lithography system.  The spread of the distribution (46 nm standard deviation) mainly arises from imperfections within our imaging system, for example a beam-offset introduced by the bandpass filter that allows us to measure emission from the QDs.  To "successfully" couple the QD to a nanophotonic structure we require the total error to be smaller than the size of the features in its light-field.  Our total error, which is dominated by the random error of the procedure, is sufficiently small to enable excellent coupling to a PhCW.~\cite{Javadi2017}

A similar analysis of the nanoguides on the doped sample reveals the benefit of taking all images using the same filter.  The misalignment histogram for this sample, which we show in Fig.~\ref{fig:f2_misalignment}c, reveals a $\Delta$ of only ($1\pm 33$) nm.  That is, in this case we observe a vanishing average systematic shift of the alignment, and a smaller spread in the misalignment relative to that of the undoped sample.  We attribute this improvement to using the same physical imaging optics for both alignment and QD frames. Finally, since the beam positioning resolution of our state-of-the-art electron beam lithography is only 0.1 nm, we conclude that it is the optical aspect of our technique, and not the nanofabrication, which determines the final alignment precision.

\section{Effects of nanofabrication}\label{sec:Effects}
The effects of nanofabrication on the intrinsic optical properties of quantum dots are largely unknown. In fact, only the linewidth changes~\cite{Liu2018} and spectral shifts~\cite{Kaganskiy2015} of quantum dots in undoped micropillars have been studied; no such reports exist at all for high-quality, electronically contacted QDs.  To address this need, we record the fluorescence spectra from the QDs before and after nanofabrication, for both types of wafers by optically exciting them from the top.   For the QDs in the doped samples, we maintain the same bias voltage of 300~mV before and after nanofabrication.

Exemplary spectra of the same QD in bulk and in a nanoguide, here in an undoped wafer, are shown in Fig.~\ref{fig:f3_shifts}a.
\begin{figure}
\begin{center}
\includegraphics[width=8.4cm]{./Fig3.pdf}
\caption{Effects of nanofabrication on the spectral properties of QDs.  (a) Emission spectra for a QD both before nanofabrication (bulk sample), and after when it is embedded in a nanoguide.  Each spectra is normalized to its respective maximum, and the spectral shift $\Delta \lambda$ is marked.  (b) and (c) Histograms of spectral shifts for QDs embedded in nanobeam and PhCWs, respectively, in undoped samples.  Also shown are the fitted normal distributions from which we extract the mean $\Delta \lambda$ for each set of structures. (d) and (e) Same as in (b) and (c) but for the doped wafer, with all spectra taken at an applied $V = 300$~mV.}
\label{fig:f3_shifts}
\end{center}
\end{figure}
For this QD, we observe a clear shift $\Delta \lambda\approx1$~nm, which is a typical value for this wafer and this structure.  In fact, from the histogram of such shifts (Fig.~\ref{fig:f3_shifts}b) we calculate a mean $\Delta \lambda = \left(0.8\pm 0.6\right)$~nm.  Similar data for the QDs in PhCWs reveal a smaller $\Delta \lambda = \left(0.1\pm 0.7\right)$~nm (Fig.~\ref{fig:f3_shifts}c).  Shifts of this order of magnitude are consistent with either the creation of surface states during the nanofabrication,~\cite{Lee2006a} or changes to the stress and strain within the GaAs membrane due to the removal of the sacrificial layer.~\cite{Nakaoka2003} As we discuss below, the uniformity of the shifts suggests that the latter effect dominates, in which case the different values of $\Delta \lambda$ for the two types of structures may arise from their different dimensionalities and material compositions.

We perform similar experiments and analysis on the QDs embedded in nanophotonic waveguides on the doped samples. In this case, we measure $\Delta \lambda = \left(-0.2\pm 0.3\right)$~nm and $\left(-1.1\pm 0.6\right)$~nm for the QDs embedded in the nanoguides and PhCWs, respectively (Figs.~\ref{fig:f3_shifts}d and e). Although these shifts are of the same magnitude as those in the intrinsic sample, they are now in the opposite direction, demonstrating that the fabrication process affects the layered and homogeneous wafers in a different manner.

The spectral shifts presented in Fig.~\ref{fig:f3_shifts} can be further subdivided according to nanoguide width or emitter position within the unit cell for the PhCWs. The results, presented in Fig.~\ref{fig:f4_ShiftsVDistance}, demonstrate that in either case the shift is constant to within the measurement error.
\begin{figure}
\begin{center}
\includegraphics[width=8.4cm]{./Fig4.pdf}
\caption{Dependence of the spectral shift of QD resonances due to integration in (a) nanoguides of various sizes and (b) and (c) different positions within PhCWs.  The dark colored symbols and error bars are the mean and standard deviation of $\Delta\lambda$, with the corresponding individual measurements shown by the faded circles. The inset to (a) shows the width of the nanoguide, while in (b) and (c) the positions of the QDs within the unit cell of the PhCW are depicted.}
\label{fig:f4_ShiftsVDistance}
\end{center}
\end{figure}
This means that, for the nanoguides (Fig.~\ref{fig:f4_ShiftsVDistance}a), there is no appreciable difference to $\Delta\lambda$ between QDs that are 144~nm away from the waveguide wall and those with a separation of 315.5~nm.  This is likewise true for the QDs in the PhCWs, regardless of whether the QD was shifted in $x$ or $y$ along the unit cell (Figs.~\ref{fig:f4_ShiftsVDistance}b and c, respectively), although a larger $\Delta\lambda$ is observed for the doped sample.  Here, the separation between the QDs and the nearest edge of the PhCWs varied between about 29 and 171 nm.  The uniformity of these shifts allows us to conclude that they do not arise due to the presence of surfaces, for example due to the trapping of charges, but rather supports the notion that their origin can be traced to the general relaxation of the GaAs membrane due to the removal of the sacrificial AlGaAs layer.

Encouragingly, the fabrication-induced shifts can be largely overcome through the electrical gating of the QDs in the doped sample.  This can be seen in the $\mu$PL spectra, taken with above-band excitation for different applied bias voltages, an example of which is shown in Fig.~\ref{fig:f5_VFmap}.
\begin{figure}
\begin{center}
\includegraphics[width=7.8cm]{./Fig5.pdf}
\caption{Electrical tuning of QDs before and after fabrication of a PhCW. (a) Voltage-wavelength PL spectra for a QD located 170 nm away from the nearest surface of a PhCW. The fluorescence plateaus of both the neutral $\left(X^0\right)$ and charged $\left(X^+\right)$ excitons are seen in the maps and, in this exemplary case, both blue shift by about 0.3 nm with applied bias. The curvature of the plateaus, however, changes differently, revealing that the nanofabrication affects the two excitons differently. These changes can be quantified via a theoretical model (dashed line), as discussed in the main text. (b) Fit parameters for the different excitons shown in (a).  (c) Nanofabrication induced changes to the Stark-shift parameters as a function of nominal distance to the nearest vertical surface.  Two to four QDs were measured at each position of the PhCW unit cell, and the error bars represent the calculated standard deviation.}
\label{fig:f5_VFmap}
\end{center}
\end{figure}
Here the charge plateaus for both the neutral $\left(X^0\right)$ and charged $\left(X^+\right)$ excitons are displayed both in bulk and after integration into a PhCW. The charged exciton is identified as positively charged because it appears at lower applied bias voltages (i.e. larger fields) than the neutral excitonic line.~\cite{Kirsanske2017, Dalgarno2008} For both excitons, we observe a blue-shift of the emission wavelength due to the nanofabrication, whose statistics were captured in Fig.~\ref{fig:f3_shifts}e.  It is clear that, for this QD, increasing the applied bias by about 150 mV recovers the bulk emission wavelength over a fairly broad bandwidth of $\approx 0.6$ and $0.5$~nm for $X^0$ and $X^+$, respectively.

By fitting the Stark shift of the QD as is done in Fig.~\ref{fig:f5_VFmap}a (dashed lines), we quantify the effects of the nanofabrication on the emitter dipole. This model describes the quadratic dependence of the Stark shift on the transition energy,~\cite{Fry2000, Finley2004, Bennett2010} written in the terms of emission wavelength as
\begin{equation}\label{eq:SS}
\frac{hc}{\lambda} = \frac{hc}{\lambda_0} - p_z F + \alpha F^2.
\end{equation}
Here, $\lambda_0$ is the QD emission wavelength at vanishing applied field, $p_z$ is the permanent dipole moment of the QD in the growth direction, $\alpha$ is the polarizability of the emitter, and $F = \left(V-V_i\right)/t$ is the applied field for a given bias voltage $V$. The thickness of the intrinsic layer surrounding the QDs is nominally $t=70$~nm and the built-in field has been calculated from the difference between the Fermi levels of the p- and n-doped GaAs layers,~\cite{Sze2006} resulting $V_i/t = 224.24$~kV/cm. The fit parameters for the 4 excitonic lines shown in Fig.~\ref{fig:f5_VFmap}a are given in Fig.~\ref{fig:f5_VFmap}b, and are comparable with values reported in literature.~\cite{Bennett2010, Finley2004, Warburton2002, Hsu2001}

We analyze similar frequency-voltage spectral maps for QDs located at different positions within the PhCW unit cell, quantifying possible fabrication induced changes to the dipole parameters. The results are presented in Fig.~\ref{fig:f5_VFmap}c. This analysis reveals that the effects of the nanofabrication on the charged exciton are generally small compared to the changes of $X^0$.  This observation may be related to the different exciton wavefunctions associated with neutral and charged excitons where the former is further extended than the latter,~\cite{Finley2004} therefore possibly making it more susceptible to the local environment. We also note that no pronounced dependence on the distance of the QDs from the etched holes are observed, which indicates once again that strain and stress alterations rather than surface defects may be responsible for the observed spectral changes.

\section{Conclusions and outlook}
We have presented a method for precisely locating epitaxially grown QDs that allows us to deterministically integrate the emitters into nanostructured photonic waveguides.  In contrast to previous approaches, we only rely on photoluminescence data and not on reflections to image both the QDs and a global reference frame.  This improvement enables us to position high-quality, gate-tunable QDs with a random error of only 33~nm, almost halving the error of previously reported $\mu$PL results.~\cite{Thon2009}  Here, we employ this method to couple QDs to the hot-spot of a PhCW with a yield of over 90\%, and can even place electronically-contacted emitters within about 30 nm from a hole with a 33\% success rate.  Our method allows us to investigate the effects of nanofabrication on the emission wavelength and exciton properties of individual QDs, and will enable similar studies of other emission properties such as QD linewidths and coherence.

The obtained precision suffices next-generation quantum nanophotonics experiments with waveguides and cavities, such as mapping out the spatial dependence of the optical local density of states or precisely probing the spatial polarization profile of nanophotonic waveguides leading to chiral emission,~\cite{Lodahl2017} or robust demonstration of strong coupling.~\cite{Kuruma2016} In fact, in a subsequent work,~\cite{Chu2019} we make use of the technique presented here to spatially and spectrally position QDs in PhCWs. In doing so, we are able to simultaneously exploit both the slow-light effect and the high confinement of the propagating mode to overcome intrinsic non-radiative processes and significantly boost the device quantum efficiency. Combined with the demonstrated spectral control via Stark tuning, a path is laid out towards the deterministic coupling of multiple QDs via the engineered dipole-dipole interaction through the waveguide. Such controlled interaction may be applied for two-qubit gates between emitting QDs, enabling the generation of advanced photonic quantum resources such as 2D clusters of multiple entangled photons.~\cite{Buterakos2017}

\begin{acknowledgments}
The authors gratefully acknowledge Sandra {\O}. Madsen for her help in the construction of the optical setup and Leonardo Midolo and Zhe Liu for assistance in fabrication. We gratefully acknowledge financial support from the Danish National Research Foundation (Center of Excellence Hy-Q), the Europe Research Council (ERC Advanced Grant SCALE), the European Union's Horizon 2020 research and innovation program under the Marie Sk\l{}odowska Curie grant agreement no. 753067 (OPHOCS), Innovation Fund Denmark (Quantum Innovation Center Qubiz), and the Danish Research Infrastructure Grant (QUANTECH). R.S., A.L. and A.D.W. acknowledge gratefully support of DFG-TRR160, BMBF - Q.Link.X 16KIS0867, and the DFH/UFA CDFA-05-06.
\end{acknowledgments}

\section*{data availability}
The data that support the findings of this study are available from the corresponding author upon reasonable request.


\section*{Introduction}

The superconducting proximity effect describes the processes in which correlations are induced in a normal metal by a superconducting electrode~\cite{klapwijk_proximity_2004}. The microscopic origin of the proximity effect lies in the Andreev reflections which couple the electron and hole states at the border of a normal metal and a superconductor (SC). In the past few years, interest in Andreev processes has experienced a renaissance, driven by the promise of producing exotic states and excitations, such as Majorana zero modes and chiral Majorana fermions~\cite{BeenakkerRMP2015}, which may be used for topological quantum computing~\cite{Stern_topological_2013}. Many concrete implementations of Majorana modes have been proposed, relying on superconductors proximitizing either materials with spin-orbit coupling~\cite{lutchyn_majorana_2018} or various quantum Hall (QH) systems~\cite{mong_universal_2014,qi_chiral_2010}.

In this work, we directly probe chiral Andreev edge states (CAES), which result from inducing superconducting correlations in the integer QH edge states. Semiclassically, CAES result from skipping orbit trajectories, in which an electron turns into a hole and back to an electron upon successive Andreev reflections from a SC interface. Quantum mechanically, this combination of Andreev reflections with the QH edge states yields fermionic modes in which the electron and hole states are hybridized and propagate chirally along the QH-SC interface~\cite{takagaki_transport_1998,hoppe_andreev_2000,Khaymovich_2010}. Under certain conditions, CAES are predicted to be self-conjugate, becoming chiral Majorana fermions~\cite{lian_edge-state-induced_2016,gamayun_two-terminal_2017}.

The early search for CAES in \Rom{3}-\Rom{5} semiconductor devices focused on magneto-conductance oscillations in the QH regime~\cite{eroms_andreev_2005,batov_andreev_2007}. Later, graphene samples in the QH regime were shown to have enhanced conductance between superconducting contacts~\cite{Komatsu2012,rickhaus_quantum_2012}.
Recent progress in making transparent type \Rom{2} superconducting contacts to both GaAs~\cite{wan_induced_2015} and encapsulated graphene~\cite{BenShalom_quantum_2015,Calado_ballistic_2015} has enabled the observation of several new phenomena, including edge state-mediated supercurrent~\cite{amet_supercurrent_2016} and crossed Andreev conversion~\cite{lee_inducing_2017}.

Nevertheless, despite some recent attempts \cite{park_propagation_2017,kozuka_andreev_2018,matsuo_equal-spin_2018}, direct evidence for CAES remains elusive. To conclusively identify the CAES one must demonstrate their propagation along the superconducting contact. Naively, one may expect that any electrical signal spreading along the contact will be shunted by the superconductor. Here, we demonstrate that this is not the case. The main mechanism allowing us to detect the CAES in this work is their interference, which can be described as follows: An incoming electron approaching the superconducting contact is decomposed into a linear combination of CAES~\cite{Khaymovich_2010} propagating along the QH-SC interface with different wavevectors. The accumulated phase difference between these modes can result in the original electron turning into a hole as it exits the opposite end of the interface~\cite{van_ostaay_spin-triplet_2011,lian_edge-state-induced_2016}. The appearance of the hole can be then detected by measuring the voltage on a normal contact located downstream from the grounded SC contact~\cite{lee_inducing_2017}. We observe the beating signal which proves that the CAES are formed by a coherent superposition of the electron and hole amplitudes. By further analyzing the interference between the CAES, we show that these modes are on average neutral -- their electron and hole components have a roughly equal weight. These results demonstrate that transport measurements can detect the presence of CAES despite their charge neutrality. Our approach opens the door for detecting the chiral Majorana modes in topological superconductors.

\section*{Results}

\begin{figure}
\includegraphics[width=1\textwidth]{AES_figs/Fig1/fig1.pdf}

\noindent {\bf Fig.\,1.} {\bf Andreev reflection in the QH regime.} (\textbf{A}) Optical image of the sample. Superconducting contacts (gray) are placed between normal contacts (gold). The magnetic field is applied into the plane, resulting in counterclockwise travel of electron and hole when the graphene (blue) is n-doped. We use a four-terminal scheme to measure the Hall voltage $V_{xy}$ simultaneously with the SC downstream longitudinal voltage $\widetilde{V}_{xx}$. The sign of $\widetilde{V}_{xx}$ is carefully defined as the voltage of contact \textbf{\textit{d}} minus the voltage at contact \textbf{\textit{c}}. (\textbf{B}) Fan diagram of the zero-bias Hall conductance $G_{xy}$. The filling factors are labeled on the plateaus. Degeneracy of the LLs starts to lift around $B=1$ T, suggesting the high quality of the graphene region. (\textbf{C}) Temperature dependence of zero-bias SC downstream longitudinal resistance $\widetilde{R}_{xx}$ around $\nu=2$ at $B=3$ T together with the simultaneously measured Hall conductance $G_{xy}$. The oscillations of $\widetilde{R}_{xx}$ on $\nu=2$ plateau disappears at 1.8 K. (\textbf{D}) At a certain $V_G$, an electron injected into a pair of CAES exits as a hole. The bottom panel shows the electron (red) and hole (blue) wavefunction densities from a tight-binding calculation in the lowest Landau-level.
\end{figure}

Our samples are made from graphene encapsulated in hexagonal boron nitride (hBN). The graphene-hBN heterostructure is deposited on a doped Si wafer capped with a 280 nm SiO$_2$ layer, which serves as a back gate. One-dimensional contacts are made to the heterostructure~\cite{wang_one-dimensional_2013} using both normal and superconducting metal electrodes as shown in Fig.\,1A. The SC electrodes are sputtered molybdenum-rhenium alloy (MoRe), a type \Rom{2} superconductor with an upper critical field $H_{c2} \sim 10$ T, a critical temperature $T_c \sim 10$ K, and a superconducting gap $\Delta_0 \sim 1.3$ meV. We have previously demonstrated that the interface between MoRe and graphene is highly transparent~\cite{borzenets_ballistic_2016}. In addition to the SC electrodes, the sample has several normal contacts made of thermally evaporated Cr/Au.

The lengths of the top and bottom SC interfaces $L$ are 150 nm and 600 nm, respectively. We focus on the bottom contact (\textbf{\textit{c}} in Fig.\,1A). The $L=600$ nm length is chosen so that it falls in the range between the induced superconducting coherence length $\xi_s=\hbar v/\pi \Delta_0 \sim160$ nm, and the phase coherence length of QH edge states $\xi_{\varphi}=\hbar v/2\pi k_B T$~\cite{qhcoherence_2008}, which is $\sim 12 \mu$m at $T=0.1$ K. In this estimates, the velocity of the edge states, $v$, is taken to be equal to the Fermi velocity of graphene, $v_F\sim10^6$ m/s. While this is typically true only for sharp vacuum edges, our simulation (see \cite{sup} section S6) suggests that the CAES velocity is likely lower but comparable to $v_F$, which places $L=600$ nm comfortably between $\xi_{\varphi}$ and $\xi_s$. This condition ensures both that the propagation of the CAES along the contact is quantum-mechanically coherent, and that the crossed Andreev conversion~\cite{lee_inducing_2017} is suppressed.

Throughout these measurements, we apply a current from the normal contact labeled \textbf{\textit{a}} while keeping the bottom superconducting contact \textbf{\textit{c}} grounded (Fig.\,1A). The current is comprised of a variable DC component, $I$, and a small AC excitation of 10 nA which allows us to measure the differential resistance. To probe CAES propagation along the SC contact, we study the longitudinal resistance, $\widetilde{R}_{xx}=d\widetilde{V}_{xx}/dI$, where $\widetilde{V}_{xx}$ is measured between the normal contact \textbf{\textit{d}} and the adjacent grounded superconducting contact \textbf{\textit{c}}. We refer to this quantity as the ``downstream resistance'' to reflect the quantum Hall intuition that the edge states propagate along the chiral direction and thus contact \textbf{\textit{d}} is located downstream from contact \textbf{\textit{c}}. In conventional devices with normal contacts, $\widetilde{R}_{xx}$ would correspond to the longitudinal resistance $R_{xx}$, which equals zero on QH plateaus and is positive between them (fig.\,S1).

We also simultaneously measure the differential Hall conductance, $G_{xy}=dI/dV_{xy}$, where the transverse voltage is measured between the normal contacts \textbf{\textit{b}} and \textbf{\textit{d}} in Fig.\,1A. This quantity remains well-quantized through the relevant range of gate voltages and temperatures below 3 K. This ensures that the bulk of the sample is gapped and that transport occurs only through the edge states. In the data presented, the sample is held at the base temperature below 100 mK unless otherwise specified, and the MoRe remains superconducting at all the magnetic fields ($B<6$ T) and temperatures studied.

Fig.\,1B shows the map of Hall conductance $G_{xy}$ measured vs. $B$ and gate voltage $V_{G}$. The valley and spin degeneracies in this sample start to lift at $B \sim 1$ T, leading to the appearance of all integer filling factors, $\nu$. The broken symmetry states have smaller activation gaps than the main sequence of filling factors $\nu=4 (n+1/2)$. In order to ensure that the bulk of the sample remains insulating when we vary the current bias and temperature, we focus on the robust filling factor $\nu=2$ (filled lowest Landau level) which has an energy gap on the order of tens of meV. In Fig.\,1C, we plot the simultaneous measurement of $\widetilde{R}_{xx}$ and $G_{xy}$ versus $V_{G}$ in the range corresponding to the Landau level filling factor $\nu=2$ at $B=3$ T. The Hall conductance is well-quantized, despite the fact that the current flows through a superconducting drain contact. This observation is in agreement with the Landauer-B\"uttiker (LB) formula in \cite{sup} section S3, which shows that $G_{xy}$ measured between the normal contacts \textbf{\textit{b}} and \textbf{\textit{d}} should be quantized regardless of the properties of the drain contact.

We focus next on the range of gate voltages ($5$ V$<V_G<5.7$ V) in which $G_{xy}$ remains well-quantized at $2\ e^2/h$ even at higher temperature ($T < 3$ K), ruling out any possible contribution from the bulk. Remarkably, in this range the downstream resistance $\widetilde{R}_{xx}$ shows clear deviations from the zero signal usually expected in the QH regime (see \cite{sup} section S1). As the temperature is increased, $\widetilde{R}_{xx}$ gradually flattens and approaches zero, and eventually a conventional QH behavior of zero longitudinal resistance is recovered around $2$ K. Note that this temperature is still very small compared to the QH gap and indeed $G_{xy}$ remains well-quantized. We conclude that the deviations from zero in the downstream resistance are due to superconductivity of contact \textbf{\textit{c}}, whose influence is suppressed by raising the temperature. Incidentally, the vanishing of $\widetilde{R}_{xx}$ observed around $2$ K suggests that contact \textbf{\textit{c}} would be fully transparent in its normal state.

A particularly intriguing aspect of $\widetilde{R}_{xx}$ is the fact that it becomes negative at some gate voltages -- this means that contact \textbf{\textit{d}} acquires a chemical potential lower than the chemical potential of the grounded contact \textbf{\textit{c}}! We attribute this behavior to the following process: An electron approaching the superconductor turns into a linear combination of CAES. For each electron state, a pair of CAES is formed when the proximity effect couples the electron edge state with the hole edge state at the same energy~\cite{Khaymovich_2010} (see \cite{sup} section S2\&S6). Since their wavevectors are different, the two CAES acquire a phase difference while propagating along the superconducting interface, resulting in a beating pattern between the electron and hole components of the wavefunction~\cite{lian_edge-state-induced_2016}. If the CAES interference produces a hole at the end of the SC-graphene interface, the hole will flow to contact \textbf{\textit{d}} and lower its chemical potential. Note that in contrast to Ref.~\cite{lee_inducing_2017}, which studies crossed Andreev conversion \emph{across} the superconductor, the negative signal observed here is due to the interference of CAES propagating \emph{along} the contact. As a result, $\widetilde{R}_{xx}$ is sensitive to the phase accumulated along the interface, which makes it dependent on the gate voltage.

Fig.\,1D shows the results of a tight-binding calculation of an electron injected in a quantum Hall edge state toward an interface with a superconductor (See \cite{sup} section S6). Note the clear beating pattern between the electron and hole probabilities. The value of the chemical potential is chosen such that the outgoing state is almost purely a hole. We can alternatively obtain an outgoing electron, or any superposition of electron and hole, by changing the chemical potential in our simulation, which corresponds to varying the gate voltage in the experiment. As a result, the calculated probabilities of the outgoing state being an electron, $P_e$, or a hole, $P_h$, show pronounced oscillations (fig.\,S11).

Experimentally, the beating pattern between the two CAES is likely to be affected by multiple parameters, such as the interface roughness, disorder potential, electron density profile near the contact, and even positions of vortices in the SC contact (fig.\,S3 and S4). As a result, the downstream resistance measured as a function of the gate voltage acquires a pattern of random but highly reproducible fluctuations (Fig.\,1C), in which the signal is positive or negative depending on whether the superconductor emits predominantly an electron or a hole.

\begin{figure}[h]
\includegraphics[width=1\textwidth]{AES_figs/Fig2/fig2.pdf}

\noindent {\bf Fig.\,2.} {\bf The interference of CAES on various QH plateaus and its magnetic field dependence.} (\textbf{A}) Zero-bias $\widetilde{R}_{xx}$ plotted versus gate voltage $V_G$ at $B=3$ T together with the simultaneously measured $G_{xy}$. $\widetilde{R}_{xx}$ oscillates around zero on the well quantized plateaus of $\nu=2, 3, 5, 6, 7$ (shaded regions). (\textbf{B}) Zero-bias $\widetilde{R}_{xx}$ plotted versus gate voltage $V_G$ and magnetic field $B$. Filling factors are labeled based on the $G_{xy}$ fan diagram in Fig.\,1C, with the  boundaries for $\nu=2$ and $6$ drawn as black lines. The oscillations in the well-quantized region gradually die out with increasing magnetic field. (\textbf{C}) Peak values of $\widetilde{R}_{xx}$. The maximum and minimum of $\widetilde{R}_{xx}(V_G)$ on the $\nu=2$ plateau are plotted vs. $B$. On average, $\widetilde{R}_{xx}$ varies around zero, indicating that the CAES are roughly equal superpositions of electrons and holes.
\end{figure}

The behavior observed in Fig.\,1C is generic. In Fig.\,2A, we plot $\widetilde{R}_{xx}$ and $G_{xy}$ at $3$ T in a wider range of gate voltages. Clearly, $\widetilde{R}_{xx}$ oscillates around zero as a function of the gate voltage for a range of integer filling factors. We could also expect mesoscopic fluctuations in the downstream resistance to be induced by changing the magnetic field, $B$, which changes the magnetic length. Indeed, our simulations indicate that $P_e-P_h$ oscillates with magnetic field (fig.\,S10).

To explore this dependence experimentally, we plot $\widetilde{R}_{xx}$ as a function of both $B$ and $V_G$ in Fig.\,2B. The overall pattern is reminiscent of the traditional Landau fan diagram of the longitudinal resistance, with the exception that the downstream resistance $\widetilde{R}_{xx}$ is not equal to zero on the plateaus. Mesoscopic fluctuations that deviate from zero resistance (white) appear inside the QH plateaus as blue (negative) and red (positive) pockets. A prominent feature of this data is the frequent abrupt changes of the $\widetilde{R}_{xx}(V_G)$ pattern while sweeping the magnetic field.  Although the field sweeps are stable and reproducible in a very small range of $B$, changing the field by several mT completely changes the $\widetilde{R}_{xx}(V_G)$ curves (see fig.\,S3B for more details). This stochastic switching complicates the analysis of the map.

We note that when switching of the $\widetilde{R}_{xx}(V_G)$ curve occurs, the $G_{xy}$ stays unchanged (compare Fig.\,1B and 2B). This can also be noticed in fig.\,S3A in the regions slightly outside the quantized plateau, where $G_{xy}$ develops a recognizable mesoscopic pattern. This observation indicates that the switching events do not involve the normal contacts \textbf{\textit{b}} and \textbf{\textit{d}} between which $G_{xy}$ is measured, nor the bulk of the sample. Instead, they must originate in the superconducting contact \textbf{\textit{c}}. We surmise that the switching of the $\widetilde{R}_{xx}$ pattern is caused by the rearrangement of vortices inside the type II superconducting contact. Indeed, we have routinely observed similar switching events in the interference pattern of supercurrent in Josephson junctions fabricated with similar contacts. In \cite{sup} section S4, we show that we can hysteretically switch between two distinct patterns of $\widetilde{R}_{xx}$ multiple times, indicating that the vortices can be controllably added to and removed from the superconductor.

To explain the observed sensitivity of $\widetilde{R}_{xx}$ to the vortex configuration, we note that adding a vortex close to the interface should change the phase of the order parameter along the QH-SC interface $\theta (x)$. As a result of this change, a pure electron or a pure hole state would only acquire an overall phase, which would not change $\widetilde{R}_{xx}$. However, the change of $\theta (x)$ is expected to change the relative phase shift between the two interfering CAES. This idea is supported by our simulations, which show that the $P_e-P_h$ curve is strongly affected by adding a single vortex, modeled as a kink of magnitude $\pi$ in $\theta (x)$ (fig.\,S11).

To extract information otherwise buried in the stochastic switching, we analyze the impact of $B$ on the gate-dependent oscillations on the $\nu=2$ plateau. The plateau region used for this analysis is selected such that $G_{xy}$ is within 1\% off the quantized values, as indicated by the black lines in Fig.\,2B. We then find the minimum and maximum $\widetilde{R}_{xx}(V_G)$ for a given field and plot the resulting $\min\widetilde{R}_{xx}(V_G)$ and $\max \widetilde{R}_{xx}(V_G)$ as a function of $B$ in Fig.\,2C. First, we find that the amplitude of the fluctuations decreases with $B$. Most likely, this suppression is explained by the loss of individual carriers that may be absorbed by the superconductor. Evidently, this process becomes more effective at higher $B$.
Second, the typical amplitudes of the positive and negative signals are very close. We argue that this observation indicates that CAES are on average neutral (see \cite{sup} section S2\&S6). Indeed, if the two CAES $\psi_{1,2}$ had predominantly electron-like and hole-like characters, the incoming electron would couple primarily to $\psi_1$. This would in turn result in a greater likelihood of electrons being emitted downstream, and $\widetilde{R}_{xx}$ would mostly stay positive, i.e. $\max\widetilde{R}_{xx}(V_G) > |\min \widetilde{R}_{xx}(V_G)|$, contrary to our observations.

Our numerical simulations support this argument: the eigenmodes $\psi_{1,2}$ are given by coherent superpositions of electron and hole amplitudes, which have distinct patterns in space. Nevertheless, the integral of the probability of the electron and hole components is close to $1/2$ (fig.\,S9), resulting in the overall approximately neutral character of the CAES. Due to particle-hole symmetry of the model, $\psi_2$ at zero energy is the charge conjugate partner of $\psi_1$, meaning that the pattern of the electron and hole amplitudes is interchanged.

\begin{figure}
\includegraphics[width=1\textwidth]{AES_figs/Fig3/fig3.pdf}

\noindent {\bf Fig.\,3.} {\bf The bias-dependence of the interference effect.} (\textbf{A}) The SC downstream longitudinal resistance $\widetilde{R}_{xx}$ plotted versus the DC bias current $I$ and gate voltage $V_G$ on a well-quantized $\nu=2$ plateau at $B=$ 3 T. Gate-dependent oscillations centered at zero-bias are observed, indicating interference of the CAES. (\textbf{B-D}) Bias-dependent oscillations of $\widetilde{R}_{xx}$ at the gate voltages $V_G=5.08$ (\textbf{B}), $5.19$ (\textbf{C}) and $5.29$ (\textbf{D}) V marked by the arrows in (\textbf{A}). Oscillations die out with increasing temperature. (\textbf{E}) The dispersion relation of a pair of CAES at a QH-SC interface calculated from the tight-binding simulation. The momentum difference between the two modes varies with energy, causing oscillations of $\widetilde{R}_{xx}$ in bias.
\end{figure}

Finally, we address the non-linearity of the CAES energy-momentum dispersion. In Fig.\,3A, we plot the $\widetilde{R}_{xx}$ map measured as a function of $I$ and $V_{G}$. This data corresponds to the range nominally identical to Fig.\,1C; however it was measured following a sweep of magnetic field, so the individual mesoscopic features have changed. The dependence of this map on temperature and additional maps for $\nu=6$ are shown in section S5 of \cite{sup}.

Most notably, we find that $\widetilde{R}_{xx}$ in Fig.\,3A oscillates not only with the gate voltage, but also as a function of the DC current bias. These oscillations are revealed in the vertical cross-sections of the map, taken at $V_G=5.08, 5.19$ and $5.29$ V and plotted in Fig.\,3B-D. Quite unusually, the signal can even oscillate several times as a function of bias, as shown in Fig.\,3C. To interpret these oscillations, we note that the applied current tunes the energy of the injected electrons with respect to the grounded superconducting contact, $E=eI/G_{xy}$. The wavevector difference $\delta k$ between the two CAES depends on their energy, as demonstrated in our model calculations in Fig.\,3E (see also \cite{sup} section S6). The phase difference accumulated by the CAES along the interface, $\delta k L$, thus produces the observed bias oscillations of $\widetilde{R}_{xx}$. Eventually, $\widetilde{R}_{xx}$ goes to zero when the applied voltage becomes comparable to the superconducting gap, $I/G_{xy} \sim \Delta/e$. At that point, the incoming electrons have high probability to enter the superconductor as quasi-particles, and no downstream signal is expected.

\section*{Discussion}

We have demonstrated robust coupling of QH edge states to a superconductor via Andreev reflections, resulting in the formation of chiral Andreev edge states which are coherent superpositions of electrons and holes. The resistance measured downstream from the superconducting contact, $\widetilde{R}_{xx}$, oscillates as a function of gate voltage and bias, providing strong evidence of the interference between the CAES. Numerical simulations qualitatively support the observed behavior by reproducing a pair of charge-conjugate CAES states which have momentum difference that depends on the Fermi energy and injection energy.

The phase difference between the CAES also depends on the vortex configuration, which results in the observed switching behavior as a function of magnetic field. The presence of the vortices is typically neglected in theoretical studies, but we find that they have a dramatic effect on the beating pattern of the CAES -- even one vortex entering the SC can change the downstream resistance.

Our analysis shows that the CAES are on average charge neutral. Nevertheless, we find that they can be detected by a DC transport measurement. Our results therefore open the door for future experiments involving neutral fermionic states, such as manipulating, detecting, and braiding chiral Majorana fermions.


\section{Comparison with existing results}

  Before we begin the actual comparison it is useful to point out that because $h^{\mu\nu}$ is a rank 3 degenerate metric, its spatial sector $h^{ij}$ is nondegenerate. Now defining $h_{ij}$ and $h^{ij}$ from (\ref{degeratematric1}) and (\ref{degeratematric}), respectively, as,
 \begin{eqnarray}
 h_{ij}&=& \Lambda_{i}{}^a \Lambda_{j}{}^a\nonumber\\
 h^{ij}&=& \Sigma_{a}{}^i \Sigma_{a}{}^j
 \label{metric}
 \end{eqnarray}
 it is easy to verify that one is the inverse of the other,
 \begin{eqnarray}
 h^{ij}h_{jk} = \delta^i_k
 \end{eqnarray}

 In flat space $h^{ij}$ and $h_{ij}$ reduce to the Kroneckar deltas. Let us now look at the form of the action valid for time independent transformations, given in the celebrated paper,
 \begin{equation}
S =
\int
\Big(\dfrac{m}{2\Theta}\Big)\dfrac{ h_{ij}\dfrac{dx^{i}}{d\lambda}\dfrac{dx^{j}}{d\lambda}}{\bigg(\dfrac{ dx^{0}}{d\lambda}\bigg)} ~d\lambda
\label{actionm4}
\end{equation}

Unfortunately this expression is not space-time covariant. It is only space covariant. Not unsurprisingly, it does not have the Newton-Cartan element as a coupling. Incidentally, the paper gives separate actions for time independent and time dependent transformations, so that a unified picture is again lost. However before we come to that aspect, let us remind that in our case no distinction is made between time independent or time dependent transformations and there is a single form for the action.

To see the invariance of the action (\ref{actionm1}) under general transformations, we explicitly present the variation of the individual terms. The denominator is invariant due to (\ref{vanish}). Likewise, the variation of the numerator can be calculated from (\ref{gt}), \ref{degeratematric1}) and (\ref{master}). It is,
\begin{equation}
\delta \Bigg( h_{\nu\rho}\dfrac{dx^{\nu}}{d\lambda}\dfrac{dx^{\rho}}{d\lambda}\Bigg)= -2\Theta\frac{dt}{d\lambda}\frac{d}{d\lambda}(x_\mu u^\mu)
\label{actionm5}
\end{equation}

Combining everything the final answer turns out to be,
\begin{equation}
\delta S = -m\int d\lambda \frac{d}{d\lambda}(x_\mu u^\mu)
\label{final}
\end{equation}
so that the action is quasi-invariant- a result that was deduced earlier in (\ref{final1}) from general considerations also. For time independent transformations the boosts do not appear and hence the invariance is exact.

Let us now make contact with (\ref{actionm4}).
 If the set of Galilean transformations do not include the boosts and if further during localisation the parameters are made only
  function of position, then the vielbeins $\Lambda_0^a$ transform as
 \begin{eqnarray}
 \delta \Lambda^{a}_{0} = w^{a}_{b} \Lambda^{b}_{0}
\end{eqnarray}
obtained from (\ref{lambdatrans}) with the subsidiary conditions $u^a = 0$ and $\xi^k$ independent of time.
We see that in these circumstances,
\begin{equation}
 \Lambda^{a}_{0} = 0
 \end{equation}
is a valid choice, though not the most general one.  The corresponding action that is obtained from (\ref{actionm1}) is just (\ref{actionm4}). Obviously complete space-time covariance is lost since the temporal part of the vielbein has been dropped.

 \section{Conclusion}

 Galilean gauge theory was mooted by us in \cite{BMM1, BMM2} to develop a complete algorithm for cou[ling a non relativistic matter theory
  with gravity which was (and still is) infested with various riddles. After that in many examples the efficacy of the GGT has been established. Applications of GGT to galilean invariant models revealed Newton Cartan structures, the geometry of which was discovered long ago by Cartan to formulate Newtonian gravity as a geometric theory. A nice account of which is given in \cite{MTW} which clearly shows that curvature appears only when gravitation is viewed as a space time process, So spatial diffeomorhism will appear as spacetime phenomena, where the diffeomorphism is restricted to be spatial. Another
  point is the special role of time. In relativity the metric is instrumental in the foliation of space time. On the contrary, in NC geometry timelike vectors determine the foliation. The assumptions of GGT automatically ensure that dynamics is described in such foliation.

  GGT is inspired by Utiyama's approach of gauging the symmetry of a dynamical model. A differen6t approach is to gauge the symmetry algebra. This may be important in other contexts but for the present problem it offers no clues. WE have at several places pointed out this limitation. The model chosen in this paper reveals the limitations of the gauging of algebra approach, as we have shown here. We also presented the results from GGT, clearing the confusions that still persists in the literature.

\end{document}


\section{Introduction}\label{sec:intro}
The collaborative filtering strategy has been widely adopted in recommendation systems~\cite{Kor09}. Matrix factorization techniques are representative collaborative filtering strategies, which factorize the data matrix with user preferences, to reveal the latent associations between users and items~\cite{PMF}. Notice that matrix factorization strategies belong to the generic class of non-linear dimensionality reduction techniques~\cite{RafailidisNM11}. In the real-world scenario the data sparsity of user preferences degrades the recommendation accuracy, as users select a few items and there are only a few preferences on which to base the recommendations. So, one of the motivations of this paper is concerned with estimating how much data sparsity affects the performance of recommendation systems and with finding solutions to improve the performance of collaborative filtering in the presence of data sparsity. In the literature several methods have been proposed to overcome this problem. For instance,~\cite{KDD09,SOCIALMF,WSDM,STE} describe methods that exploit the selections of social friends in collaborative filtering, accounting for the fact that social friends have similar preferences. However, the preferences of social friends do not necessarily match, having different influence when generating recommendations~\cite{SPF}. From the user feedback we have to learn both about her preferences and how much she is affected by her friends' selections. Nonetheless, this is a challenging task as it is difficult to determine how much her preferences are influenced by her friends when generating recommendations. In the context of social regularization in recommendation systems, recent studies try to capture the complex relationships between user preferences and those of her social friends~\cite{SPF}. In an attempt to compute the non-linearity in friends' preferences, a few deep learning strategies have been introduced to generate recommendations with social relationships, such as feedforward neural networks~\cite{FanLC18}, Denoising Autoencoders~\cite{DengHXWW17} and Restricted Boltzmann Machines~\cite{NguyenL16}.

However, what is missing from existing studies is that we have to learn how to adaptively select a subset of friends with similar behavior and weigh their influence accordingly to improve the recommendation accuracy. Recently,  attention mechanisms have been shown to be effective in various tasks such as image captioning~\cite{Xu15} and machine translation~\cite{Bah15}, among others.  Essentially the idea behind such mechanisms is that the outputs of neural models depend on \emph{`relevant'} parts of some input that the models should focus on. Armed with different attention mechanisms, various recommendation models have been designed to generate sequential~\cite{Liu18,Man18,Sun18} and context-aware recommendations~\cite{Tay18,Xiao17}. Nonetheless, these attention models are introduced to either perform next-item recommendation or focus on users' contextual factors, and do not learn the influence of social friends.

To overcome the shortcomings of existing social recommendation strategies, we propose a Neural Attention model to adaptively learn the influence of Social friends on user preferences, namely NAS, making the following contributions: (i) \emph{We design a neural architecture to carefully capture the non-linear associations between the preferences of a user and those of her friends, by taking into account the social latent effects of friends' selections on user behavior.} (ii) \emph{We propose a social behavioral attention mechanism to adaptively weigh the influence of friends' preferences, and therefore focus on a subset of friends that have similar behaviors when generating recommendations.} In our experiments on benchmark datasets from Epinions and Flixster we evaluate the performance of the proposed NAS model compared to other state-of-the-art methods, as well as we further study the importance of the proposed social behavioral attention mechanism.

The remainder of the paper is organized as follows, Section~\ref{sec:rel} reviews related work, and then Section~\ref{sec:prop} details the proposed NAS model. Finally, in Section~\ref{sec:exp} we examine the performance of the proposed model against baseline models, and Section~\ref{sec:conc} concludes the study.

\section{Related Work}\label{sec:rel}
\subsection{Social Recommendation}
To leverage the recommendation accuracy with friends' selections, Ma et al.~\cite{SOREC} present a social regularization method by sharing a common user-item matrix, factorized by ratings and social relationships. Jamali and Ester~\cite{SOCIALMF} extend~\cite{SOREC} by weighting the user latent factors based on their social relationships. In~\cite{STE}, a social ensemble method is presented to combine matrix factorization with a social-based neighborhood model. Guo et al.~\cite{TRUSTSVD} extend  SVD++~\cite{KDD08} to learn both the user preferences and the social influence of her friends. The aforementioned methods exploit social relationships and use different squared loss functions to minimize the prediction/rating error. On the other hand, several methods focus on the ranking performance when generating the recommendations with social relationships. For example, Grimberghe et al.~\cite{WSDM} combine multi-relational matrix factorization with the Bayesian personalized ranking framework~\cite{BPR} to model users' feedback both on items and on social relationships. Zhao et al.~\cite{CIKM14} propose a social Bayesian personalized ranking model that incorporates social relationships into a pair-wise ranking model, assuming that users tend to assign higher ranks to items that their friends prefer. In~\cite{TW09}, Jamali and Ester combine TrustWalker~\cite{KDD09} with collaborative filtering to generate recommendations with social relationships. In~\cite{RAF16a}, a collaborative ranking strategy is followed, considering how well the relevant items of users and their social friends have been ranked at the top of the list. In~\cite{RAF16b}, authors extend the model presented in~\cite{RAF16a} by combing different collaborative ranking strategies into a joint model to leverage the recommendation accuracy. Chaney et al.~\cite{SPF} infer each user's preferences and the social influence of her friends by introducing a Bayesian model that performs social poisson factorization.

Recently, a few deep learning strategies have been introduced to generate recommendations with social relationships. For example, Fan et al.~\cite{FanLC18} couple probabilistic matrix factorization with a  feedforward neural network to learn the non-linear features of users' social relationships and their preferences. In a similar spirit, Deng et al.~\cite{DengHXWW17} jointly learn matrix factorization with Denoising Autoencoders, while Nguyen and Lauw~\cite{NguyenL16} study Restricted Boltzmann Machines for representation learning of social behavior. Although these deep learning strategies can compute the non-linearity in friends' preferences, they omit the fact that only a subset of friends have similar behavior. Consequently, these deep learning strategies have limited recommendation accuracy as we will show in Section~\ref{sec:exp}.

\subsection{Neural Attention Models}
More recently, neural attention models have been introduced to produce recommendations. For example, Ebesu et al.~\cite{Eb18} propose collaborative memory networks, where the associative addressing scheme of the memory module acts as a nearest neighborhood model identifying similar users. The attention mechanism learns an adaptive non-linear weighting of the user's neighborhood based on the specific user and item. The output module exploits non-linear interactions between the adaptive neighborhood state jointly with the user and item memories to derive the recommendation. Tay et al.~\cite{Tay18} present a neural attention model to weigh the gravity of users' reviews on items, assuming that not all reviews are created equal, but only a selected few are important. Liu et al.~\cite{Liu18} incorporate attention weights in recurrent neural networks as a priority model to distinguish current interests e.g., clicks from long term preferences. Manotumruksa et al.~\cite{Man18} introduce a contextual attention gate that controls the influence of the ordinary context on the users' contextual preferences and a time- and geo-based gate that controls the influence of the hidden state from the previous check-in based on the transition context. Sun et al.~\cite{Sun18} investigate the problem of how to enhance the temporal recommendation performance, introducing an attentive recurrent network based approach. Attentional factorization machines learn the importance of each feature interaction for content-aware recommendation~\cite{Xiao17}. Nonetheless, all the aforementioned attention-based models try to capture users' sequential behavior or to learn which contextual factors are important when generating recommendations, and do not consider the impact of friends' selections on user behavior.

\begin{table}[t]
\caption{Notation.}
\vspace{-0.2cm}
\begin{center}
\resizebox{\columnwidth}{!}{%
\begin{tabular}{l|l} \hline
\textbf{Symbol} & \textbf{Description} \\ \hline
$n$ & Number of users \\ \hline
$m$ & Number of items \\ \hline
$d$ & Number of latent dimensions \\ \hline
$h$ & Number of hidden layers \\ \hline
$\mathbf{R} \in \mathbb{R}^{n \times m}$ & User-item interaction (rating) matrix \\ \hline
$\mathbf{A} \in \mathbb{R}^{n \times n}$ & Adjacency matrix of users' social relationships \\ \hline
$\mathbf{u}_{u} \in \mathbb{R}^{d \times 1}$ &  Latent vector of user $u$, with $u=1,\ldots,n$ \\ \hline
$\mathbf{v}_{i}  \in \mathbb{R}^{d \times 1}$ & Latent vector of item $i$, with $i=1,\ldots,m$  \\ \hline
$\mathbf{u}_{ufk} \in \mathbb{R}^{d \times 1}$ &  Latent vector of social friend $fk$ of user $u$ \\ \hline
$\mathbf{f}_{up} \in \mathbb{R}^{d \times 1}$ & User's $u$ latent vector based on the social effect of friend $p$, with $p=1,\dots,k$\\ \hline
$\mathbf{z}_{u} \in \mathbb{R}^{d \times 1}$ & Social latent vector of user $u$ \\ \hline
$\mathbf{W}^{e}_{q} \in \mathbb{R}^{d \times d}$ & Weight matrix in the $q$-th hidden layer of model $e$, with $q=1,\ldots, h$\\ \hline
$\mathbf{o}^{e}_{q} \in \mathbb{R}^{d \times 1}$ & Users' hidden representation in the $q$-th hidden layer of model $e$\\ \hline
\end{tabular}}
\end{center}\label{tab:not}
\end{table}

\section{The Proposed NAS Model} \label{sec:prop}
Our notation is presented in Table~\ref{tab:not}. Let $n$ and $m$ be the numbers of users and items, respectively. In matrix $\mathbf{R} \in \mathbb{R}^{n \times m}$, we store user preferences on items, in the form of explicit feedback e.g., ratings or in the form of implicit feedback e.g., number of views, clicks, and so on. By factorizing matrix $\mathbf{R}$, that is, minimizing the approximation error $\sum_{(u,i)} || \mathbf{R}_{ui} - \mathbf{u}_u^\top \mathbf{v}_i ||^2$,  we compute the user latent vectors $\mathbf{u}_u \in \mathbb{R}^{d \times 1}$ and item latent vectors $\mathbf{v}_i \in \mathbb{R}^{d \times 1}$, with $u=1,\ldots,n$,  $i=1,\ldots,m$ and $d$ being the number of latent dimensions. In addition, users' social relationships are stored in the adjacency matrix $\mathbf{A} \in \mathbb{R}^{n \times n}$, if users $a$ and $b$ are friends then $\mathbf{A}_{ab}=1$, and 0 otherwise. Each user $u$ has a set of social friends $\{f_{u1},\ldots,f_{uk}\}$, where $k$ is the number of friends of user $u$. The goal of the proposed NAS model is to weigh the influence of friends' selections on user preferences and generate recommendations, accordingly.

\begin{center}
\begin{figure*} [t]
    \includegraphics[width=\textwidth]{figure.pdf}
\caption{An overview of the proposed NAS model. Our architecture consists of the \emph{social latent effects layer}, the \emph{social behavioral attention mechanism} and the \emph{social latent vector extraction layer}. The model parameters are learned based on the objective function $\mathcal{L}$ via backpropagation.} \label{fig:over}
\end{figure*}
\end{center}

\subsection{NAS Overview}
Figure~\ref{fig:over} illustrates  an overview of the proposed NAS model.  In the example presented in Figure~\ref{fig:over}, we consider $k=3$ social friends of user $u$. By factorizing the user-item matrix $\mathbf{R}$ we compute the user latent vectors $\mathbf{u}_{u}$ and those of their social friends $\mathbf{u}_{ufk}$, as well as the item latent vectors $\mathbf{v}_{i}$ with $u=1,\ldots,n$ and $i=1,\ldots,m$. In the \emph{social latent effects layer}, we compute the social latent effects of the $k$ friends on user's $u $ preferences based on a Multi-Layer Perceptron (MLP) network. Then, in the \emph{social behavioral attention mechanism}, we calculate the attention weights $\gamma_k$ of the latent effects, which correspond to how much users' preferences match with those of their $k$ social friends. In the \emph{social latent vector extraction layer} we capture the non-linear associations between the aggregated social latent effects, that is, vector $\bar{\mathbf{f}}_u \in \mathbb{R}^{d \times 1}$, and the user latent vector $\mathbf{u}_{u}$ via a MLP network. The output is a social user latent vector $\mathbf{o}^{\zeta}_{uh}=\mathbf{z}_{u} \in \mathbb{R}^{d \times 1}$ which is combined with the item latent vector $\mathbf{v}_{i}  \in \mathbb{R}^{d \times 1}$ to learn the objective function $\mathcal{L}$ of our model.

The remainder of the Section is structured as follows, Section~\ref{sec:eff} presents the social latent effects layer, and Section~\ref{sec:att} details the social behavioral attention mechanism. Finally,  Section~\ref{sec:clv} presents the social latent vector extraction layer, and in Section~\ref{sec:objf} we formulate the objective function of the proposed NAS model, while Section~\ref{sec:det} provides the implementation details.

\subsection{Social Latent Effects Layer} \label{sec:eff}
The goal of the first layer of NAS is to compute the social latent effects. To achieve this, we first design a MLP network to model the $k$ friends' social effects on user preferences. We map the friends' latent vectors $\mathbf{u}_{uf1},\ldots,\mathbf{u}_{ufk}$ and the user latent vector $\mathbf{u}_u$ into a shared embedding layer as follows:

$\forall  p=1,\ldots, k$
\begin{equation}
\mathbf{o}^{e}_{0} = g ( \mathbf{W}^{e}_{u0}\mathbf{u}_u + \mathbf{W}^{e}_{p0} \mathbf{u}_{ufp} + \mathbf{b}^e_0 )
\end{equation}
Matrices $\mathbf{W}^{e}_{u0}$ and $\mathbf{W}^{e}_{p0} \in \mathbb{R}^{d \times d}$  are the weight matrices for the latent vectors of user $u$ and her $p$-th social friend, respectively, and  $\mathbf{b}^e_0 \in \mathbb{R}^{d \times 1} $  is the bias vector. $g(x)=\max(0,x)$ is the Rectifier (ReLU) activation function which is non-saturated. The saturation problem occurs when neurons stop learning and their output is near to either 0 or 1, a problem that might be suffered by the sigmoid and tanh functions~\cite{p30}.  Next, we stack $h$ hidden layers on the top of the embedding layer as shown in Figure~\ref{fig:over}, where the representation $\mathbf{o}^{e}_{q}$ of each hidden layer $q$ is computed as follows:

\begin{equation}
\mathbf{o}^{e}_{q} = g ( \mathbf{W}^{e}_{q} \mathbf{o}^{e}_{q-1} + \mathbf{b}^e_q )
\end{equation}
with $q=1,\ldots, h$

Having computed the representation $\mathbf{o}^{e}_{h}$ of the last hidden layer $h$, to capture the $p$-th friend's social effect on user preferences we calculate user's $u$ latent vector $\mathbf{f}_{up}$ as follows:

\begin{equation} \label{eq:fup}
\mathbf{f}_{up} = \mathbf{W}^{e}_{p} \mathbf{o}^{e}_{h} + \mathbf{b}^e_{p}
\end{equation}
where $\mathbf{W}^{e}_{p} \in \mathbb{R}^{d \times d} $ and $\mathbf{b}^e_{p} \in \mathbb{R}^{d \times 1} $ denote the weight matrix and bias vector of the final user latent vector based on the $p$-th friend's social effect, respectively.

\subsection{Social Behavioral Attention} \label{sec:att}
To measure the importance of the $k$ different social effects $\mathbf{f}_{up}$, we propose a \emph{social behavioral attention mechanism}. The attention mechanism learns an adaptive weighting function to focus on a subset of friends that have similar behavior with user $u$. Provided the $k$ social effect vectors $\mathbf{f}_{up}$ based on Equation (\ref{eq:fup}) and the user latent vector $\mathbf{u}_{u}$, we employ a single-layer perceptron to calculate the respective attention score of a social friend $p=1,\dots,k$ as follows:

\begin{equation}
\phi(\mathbf{u}_{u}, \mathbf{f}_{up}) = g(\mathbf{W}^\psi_1\mathbf{u}_{u}+\mathbf{W}^\psi_2 \mathbf{f}_{up} + \mathbf{b}^\psi)
\end{equation}
where $\mathbf{W}^\psi_1$ and $\mathbf{W}^\psi_2 \in \mathbb{R}^{d \times d}$ are the weight matrices, and $\mathbf{b}^e_{pf} \in \mathbb{R}^{d \times 1} $ is the bias. The superscript $\psi$ refers to the model for the social behavioral attention mechanism.  Then, the final weights are computed by normalizing the respective $k$ social attention scores $\gamma(\mathbf{u}_{u},\mathbf{f}_{up}) $ with the softmax function, which reflects on the importance of the $p$-th friend's social effect on user's $u$ preferences:

$\forall p=1,\ldots, k$
\begin{equation} \label{eq:att}
\gamma(\mathbf{u}_{u},\mathbf{f}_{up}) = \frac{ \exp(\phi(\mathbf{u}_{u}, \mathbf{f}_{up}) }{ \sum_{v=1}^{k} \exp(\phi(\mathbf{u}_{u}, \mathbf{f}_{uv}) }
\end{equation}
Notice that the attention mechanism selectively weighs the user's and friends similarity on preferences based on the social attention scores $\gamma(\mathbf{u}_{u},\mathbf{f}_{up}) $. Having calculated the $k$ social attention scores based on Equation (\ref{eq:att}), the latent vector $\bar{\mathbf{f}}_u$ of aggregated social effect on user's $u$ behavior is computed as follows:

\begin{equation} \label{eq:fu}
\bar{\mathbf{f}}_u = \sum\limits_{p=1}^{k}\gamma(\mathbf{u}_{u},\mathbf{f}_{up})\mathbf{f}_{up}
\end{equation}

\subsection{Social Latent Vector Extraction Layer} \label{sec:clv}
The goal of the \emph{social latent vector extraction layer} is to forecast how the social effects of the $k$ friends' different behaviors influence the user latent representation. Similar to the \emph{social latent effects layer} of Section~\ref{sec:eff}, we first map the aggregated social domain effect $\bar{\mathbf{f}}_u$ of all $k$ friends (Equation (\ref{eq:fu})) and the user's $u$ latent vector $\mathbf{u}_{u}$ into a shared embedding layer, thus constructing a hidden representation $\mathbf{o}^{\zeta}_{u0} \in \mathbb{R}^{d \times 1}$. Then, vector $\mathbf{o}^{\zeta}_{u0}$ is fed to a MLP network of $h$ hidden layers, to capture the non-linear associations of the complex social effects on user's behavior. The output of the MLP network is the \emph{social latent vector} $\mathbf{z}_{u}=\mathbf{o}^{\zeta}_{uh}\in \mathbb{R}^{d \times 1}$, that is, the last hidden representation of the MLP network, as illustrated in Figure~\ref{fig:over}.

\subsection{Objective Function} \label{sec:objf}
The proposed NAS model aims at the ranking performance of the recommendations. Having computed the social latent vector $\mathbf{z}_{u}$ for each user $u$, with $u=1,\dots,n$, we consider the respective item latent vectors $\mathbf{v}_{i}$, with $i=1,\dots,m$. In particular, we define two disjoint sets, a set $\mathcal{I}^+_u$ of observed items that user $u$ has already interacted with, and a set $\mathcal{I}^-_u$ of  unobserved items. For each observed item $i^+\in \mathcal{I}^+_u$, we randomly sample negative/unobserved items $i^-\in \mathcal{I}^-_u$, for each user $u$. According to the Bayesian Personalised Ranking (BPR) criterion~\cite{BPR}, we try to rank the observed items higher than the unobserved ones, having the following loss function:

\begin{equation} \label{eq:loss}
\mathcal{L} = - \sum_{(u, i^+,i^-)} \log \sigma(\hat{\mathbf{R}}_{ui^+} - \hat{\mathbf{R}}_{ui^-})
\end{equation}
where $\sigma(x)=1/\big(1+\exp(-x)\big)$ is the logistic sigmoid function, $\hat{\mathbf{R}}_{ui^+}=\mathbf{z}_{u}^\top  \mathbf{v}_{i+}$ and $\hat{\mathbf{R}}_{ui^-}=\mathbf{z}_{u}^\top \mathbf{v}_{i-}$.

\subsection{Implementation Details} \label{sec:det}
In our implementation we used Tensorflow\footnote{\url{https://www.tensorflow.org}}. We computed the model's parameters, that is, the weight matrices of Sections 3.2-3.4 via backpropagation with stochastic gradient descent, trying to solve the minimization problem of the ranking loss function $\mathcal{L}$ in Equation (\ref{eq:loss}). We employed mini-batch Adam~\cite{p32}, which adapts the learning rate for each parameter by performing smaller updates for frequent and larger updates for infrequent parameters. We set the batch size of mini-batch Adam to 512 with a learning rate of 1e-4. In each backpropagation iteration we performed negative sampling to randomly select a subset $\mathcal{I}^-_u$ of unobserved items as negative instances.

In addition, to account for the fact that the gradient-based optimization strategy might find a locally - optimal solution of the model's parameter set, we followed a pretraining strategy~\cite{p29}.  We first trained our model with random initializations using only one hidden layer in the MLP networks, employed in our neural architecture. Then, we used the trained parameters as the initialization of our model and varied the number of hidden layers $h$, where we concluded in the optimal number of hidden layers using cross-validation (Section~\ref{sec:param}). The pretraining strategy is very important for our model. To verify this we tested our model without applying the pretraining strategy and we found that there is an average drop of -4.36\% in the model's performance. This observation has been also confirmed by other relevant studies pointing out that the initialization of the model parameters plays a significant role for the model's convergence and performance~\cite{p26}.

\section{Experimental Evaluation} \label{sec:exp}
\subsection{Datasets} \label{sec:data}
In our experiments we used the publicly available datasets, from \emph{Epinions}\footnote{\url{https://alchemy.cs.washington.edu/data/epinions/}} and \emph{Flixster}\footnote{\url{http://www.cs.ubc.ca/~jamalim/datasets/}}. The \emph{Epinions} dataset contains 571,325 ratings on a 5-star scale of 71,002 users on 104,356 items with 508,960 social relationships. The \emph{Flixster} dataset includes 8,196,077 ratings of 147,612 users on 48,794 items with 7,058,819 social relationships. The reason for selecting  both datasets is that they are among the largest publicly available datasets with user preferences and social relationships that have been reported in the relevant literature, reflecting on the real-world sparse setting e.g., the densities of the \emph{Epinions} and \emph{Flixster} datasets are 0.0077 and 0.1138\%, respectively.

\subsection{Evaluation Protocol} We trained the examined models on the 25, 50 and 75\% of the ratings. We used 10\% of the ratings as cross-validation set to tune the models' parameters and evaluate the examined models on the remaining test ratings. To evaluate the top-$N$ recommendation performance of the examined models we used the ranking-based metrics recall and Normalized Discounted Cumulative Gain (NDCG). Recall is defined as the ratio of the relevant items in the top-$N$ ranked list over all the relevant items for each user. The NDCG metric considers the ranking of the relevant items in the top-$N$ list. For each user the Discounted Cumulative Gain is defined as:
\begin{equation}
 DCG@N = \sum_{l=1}^{N}{\frac{2^{rel_l}-1}{\log_2{l+1}}}
\end{equation}
where $rel_l$ represents the relevance score of item $l$, that is, binary relevance in our case. To remove user rating bias from our results, we considered an item as relevant if a user has rated it above her average ratings and irrelevant otherwise~\cite{Rec17}. $NDCG@N$ is the ratio of $DCG@N$ over the ideal $iDCG@N$ value for each user, that is, the $DCG@N$ value given the ratings in the test set. We set $N$=10 and repeated our experiments five times, and in our results we report average recall and $NDCG$ over the five runs.

\subsection{Compared Methods}
In our experiments we compare the following methods:
\begin{itemize}
\item \emph{\textbf{BPR}}~\cite{BPR}: a baseline ranking model that tries to rank the observed/rated items over the unobserved ones. BPR does not exploit the selections of social friends when generating recommendations.
\item \emph{\textbf{SoRec}}~\cite{SOREC}: a baseline social-based model that regularizes and weighs friends' latent factors when factorizing the user-item matrix.
\item \emph{\textbf{SBPR}}~\cite{CIKM14}: a social Bayesian ranking model that considers social relationships in the learning process, assuming that users tend to assign higher ranks to items that their friends prefer.
\item \emph{\textbf{DLMF}}~\cite{DengHXWW17}: a deep learning strategy for jointly learning Denoising Encoders with matrix factorization to capture the non-linearity in friends' preferences.
\item \emph{\textbf{DeepSoR}}~\cite{FanLC18}: a deep learning strategy for coupling probabilistic matrix factorization with a feedforward neural network to learn the social interactions of users along with their preferences.
\item \emph{\textbf{NAS*}}: a variant of our model, which ignores the social behavioral attention mechanism of Section 3.3, setting $\gamma(\mathbf{u}_{u},\mathbf{f}_{up})$=1 in Equation~(\ref{eq:att}). This variant serves as baseline to study the impact of the proposed social behavior attention mechanism on our model.
\item \emph{\textbf{NAS}}: the proposed neural attention model for social collaborative filtering.
\end{itemize}
The models' parameters have been determined based on a grid selection strategy and cross-validation, and in our experiments we report the best results. The parameter analysis of our model is presented in Section~\ref{sec:param}.

\subsection{Performance Evaluation}

Figures~2 and 3 present the experimental results in terms of recall and NDCG, respectively when varying the training set size in 25, 50 and 75\%. All the social-based models SoRec, SBPR, DLMF, DeepSoR, NAS* and NAS significantly outperform the baseline  BPR model. This is obtained by exploiting friends' selections when generating recommendations, thus reducing the data sparsity on user preferences. On inspection of the results in Figures~2 and 3, we observe that the competitive deep learning strategies DLMF, DeepSoR and NAS* achieve a higher recommendation accuracy than SoRec and SBPR, as the deep learning strategies can capture well the non-linear associations of friends' preferences in the hidden representations of their neural architectures. Although the three competitive deep learning strategies DLMF, DeepSoR and NAS* have different neural architectures, coupled with matrix factorization, we observe that they achieve comparable performance. In particular, we found that the differences of DLMF, DeepSoR and NAS* in our five runs are not always statistically significant for $p<$0.05 in the paired t-test.

The proposed NAS model achieves a 9.51\% improvement on average in terms of recall when comparing with the second best method, that is, DLMF, DeepSoR or NAS*. Similarly, NAS  outperforms the second best method by an average improvement of 11.12\% in terms of NDCG. Using the paired t-test we found that NAS is superior over all the competitive approaches for $p<$0.05. NAS beats the baselines, as it adaptively selects the weights of friends' preferences. Consequently, the proposed NAS model can self-adjust the subset of friends that express similar behavior, thus producing accurate recommendations. On the other hand, despite that the deep learning strategies DLMR and DeepSoR compute the non-linearity in friends' preferences, a self-tuning weighting strategy on friends' behavior is omitted which explains their limited performance, compared to the proposed NAS model.

To further verify this, we observe that the NAS* variant has limited performance when comparing with the NAS model, having relative drops of -12.57 and -13.85\% on average in terms of recall and NDCG, respectively. This indicates that indeed the social behavioral attention mechanism of the proposed NAS model is a key factor to boost the recommendation accuracy, by adaptively assigning larger weights to the friends that have similar behavior with a user.

\begin{figure*}[t]
\centering
\begin{tabular}{c}  \label{fig:res1}
\hspace{-2cm}\includegraphics[width=15cm]{1.pdf} \\
\hspace{-2cm}\includegraphics[width=15cm]{2.pdf}
\end{tabular}
\caption{Performance evaluation in terms of recall for the Epinions and Flixster datasets, when varying the training set size.}
\end{figure*}

\begin{figure*}[t]
\centering
\begin{tabular}{c}  \label{fig:res2}
\hspace{-2cm}\includegraphics[width=15cm]{3.pdf} \\
\hspace{-2cm}\includegraphics[width=15cm]{4.pdf}
\end{tabular}
\caption{Performance evaluation in terms of NDCG for the Epinions and Flixster datasets, when varying the training set size.}
\end{figure*}

\subsection{Parameter Analysis} \label{sec:param}
The three most important parameters in our NAS model are: (i) the number of latent dimensions $d$, (ii) the number of negative samples $|\mathcal{I}^-_u|$ for each observed sample, and (iii) the number of hidden layers $h$. In our implementation we varied the number of latent dimensions $d$ from 10 to 100 by a step of 10 and the number of negative samples $|\mathcal{I}^-_u|$ in 1-10 by a step of 1, for each positive/observed sample. In addition, we tuned the number of hidden layers $h$ from 1 to 5 by a step of 1. Notice that when varying the three parameters we keep them fixed after a point as we observed that they did not significantly increase the recommendation accuracy without paying off in terms of computational cost.

As illustrated in Figures~4 and 5 more latent dimensions $d$ and hidden layers $h$ are required for the Flixster dataset than the Epinions dataset. This occurs because the Flixster dataset has 14.3 times more ratings and 13.8 times more social relationships than the Epinions dataset (Section~\ref{sec:data}). As a consequence more latent dimensions and hidden layers are required to capture the non-linearity in a larger set of friends' preferences. In our experiments we fix $d$=50 and $h$=3 for the Epinions dataset, and $d$=80 and $h$=4 for the Flixster dataset.

On the contrary, as Figure~6 shows less negative samples $|\mathcal{I}^-_u|$ are required for the Flixster dataset than the Epinions dataset. This happens because there are more observed ratings in the Flixster dataset, thus less negative samples are needed for each observed sample. In our experiments we set $|\mathcal{I}^-_u|$=9 and 6 for the Epinions and Flixster datasets, respectively.

\begin{figure*}[t]
\centering
\begin{tabular}{cc}  \label{fig:res3}
\hspace{-0.5cm} \includegraphics[width=7cm]{5.pdf} & \hspace{-0.5cm}\includegraphics[width=7cm]{6.pdf}\\
\end{tabular}
\caption{Effect on NDCG when varying the number of latent dimensions $d$.}
\end{figure*}

\begin{figure*}[t]
\centering
\begin{tabular}{cc}  \label{fig:res4}
\hspace{-0.5cm} \includegraphics[width=7cm]{7.pdf} & \hspace{-0.5cm}\includegraphics[width=7cm]{8.pdf}\\
\end{tabular}
\caption{Effect on NDCG when varying the number of hidden layers $h$.}
\end{figure*}

\begin{figure*}[t]
\centering
\begin{tabular}{cc}  \label{fig:res5}
\hspace{-0.5cm} \includegraphics[width=7cm]{9.pdf} & \hspace{-0.5cm}\includegraphics[width=7cm]{10.pdf}\\
\end{tabular}
\caption{Effect on NDCG when varying the number of negative samples $|\mathcal{I}^-_u|$ for each observed sample/rating.}
\end{figure*}

\section{Conclusions}\label{sec:conc}
In this paper we presented NAS, a neural attention model for social collaborative filtering. The two key factors of our model are (i) to capture the non-linear associations of friends' preferences by computing the social latent effects of friends' preferences on user behavior and (ii) to self-adjust and weigh the influence of friends selections based on a social behavioral attention mechanism. Our experimental evaluation on two publicly available datasets showed the effectiveness of the proposed NAS model, evaluated against other state-of-the-art methods. Compared to the second best method, the proposed NAS model attains an average improvement of 9.51 and 11.12\% in terms of recall and NDCG in all runs. We also evaluated the impact of the proposed social behavioral attention mechanism, using a variant of our model, namely NAS* that omits the proposed attention mechanism. Our experimental results demonstrated that NAS outperformed its variant. Clearly, the social behavioral attention mechanism can significantly boost the recommendation accuracy, by adaptively weighting the impact of friends' selections on user preferences when producing recommendations.

As future work we plan to study how to extend the proposed model to perform cross-domain recommendation~\cite{GAO13,AliannejadiRC17,RafailidisC16,RafailidisC17}. This is a challenging task because we have to transfer and weigh the knowledge of user behaviors across different domains. The key factor of generating cross-domain recommendations is to develop a cross-domain attention mechanism to adaptively perform the weighting of user preferences from the source domains, and consequently generate accurate cross-domain recommendations in a target domain. In addition, an interesting future direction is to exploit the proposed neural attention mechanism for pairwise learning~\cite{SemertzidisRSD15}, social event detection~\cite{RafailidisSLSD13}, information diffusion~\cite{AntarisRN14,RafailidisN15}, exploiting distrust information~\cite{Rafailidis16a} and capturing users' preference dynamics~\cite{RafailidisKM17,RafailidisN15a}.

\bibliographystyle{unsrt}