similarity function.tex (2741B)
1 \begin{frame}{Similarity Function Approaches} 2 \begin{tabular}{@{}>{\hbadness=5000}m{73mm} @{\hspace{7mm}} >{\tikz[baseline={(0,-0.1)}]{\fill[black!30] (0,0.1) -- (0.75,0.1) -- (0.75,0.35) -- (1.25, 0) -- (0.75,-0.35) -- (0.75, -0.1) -- (0, -0.1) -- cycle;}\hspace{5mm}}l@{}} 3 \tikzmarknode{fewshot-c11}{% 4 \parbox{73mm}{\uhead{Megrez}\textsuperscript{\kern-2.5mm\wdent{850779}} is a star in the northern circumpolar constellation of \utail{Ursa Major}\textsuperscript{\kern-2.5mm\wdent{10460}}.}}% 5 & 6 \tikzmarknode{fewshot-c12}{\sfTripletHolds{e_1}{part of constellation}{e_2}} \\ 7 \multicolumn{2}{c}{} \\[1mm] 8 \tikzmarknode{fewshot-c21}{% 9 \parbox{73mm}{\uhead{Posidonius}\textsuperscript{\kern-2.5mm\wdent{185770}} was a Greek philosopher, astronomer, historian, mathematician, and teacher native to \utail{Apamea, Syria}\textsuperscript{\kern-2.5mm\wdent{617550}}.}}% 10 & 11 \tikzmarknode{fewshot-c22}{\sfTripletHolds{e_1}{born in}{e_2}} \\ 12 \multicolumn{2}{c}{} \\[1mm] 13 \tikzmarknode{fewshot-c31}{% 14 \parbox{73mm}{\uhead{Hipparchus}\textsuperscript{\kern-2.5mm\wdent{159905}} was born in \utail{Nicaea, Bithynia}\textsuperscript{\kern-2.5mm\wdent{739037}}, and probably died on the island of Rhodes, Greece.}}% 15 & 16 \tikzmarknode{fewshot-c32}{\sfTripletHolds{e_1}{born in}{e_2}} \\ 17 \end{tabular}% 18 \pause 19 \begin{tikzpicture}[remember picture, overlay] 20 \fill[white] (fewshot-c11.north east) rectangle (fewshot-c31.south-|fewshot-c12.east); 21 \end{tikzpicture} 22 \pause 23 \begin{tikzpicture}[ 24 remember picture, 25 overlay, 26 fsbrace/.style={decorate, decoration={brace,amplitude=5}}, 27 fsvar/.style={midway, anchor=west, xshift=1mm}, 28 ] 29 \draw[fsbrace] (fewshot-c11.north east) -- (fewshot-c11.south east) node[fsvar] {\vphantom{\(x\)}\smash{\textcolor{Dark2-B}{\(x_1\)}}}; 30 \draw[fsbrace] (fewshot-c21.north east) -- (fewshot-c21.south east) node[fsvar] {\vphantom{\(x\)}\smash{\textcolor{Dark2-A}{\(x_2\)}}}; 31 \draw[fsbrace] (fewshot-c31.north east) -- (fewshot-c31.south east) node[fsvar] {\vphantom{\(x\)}\smash{\textcolor{Dark2-C}{\(x_3\)}}}; 32 33 \node[right=2cm of fewshot-c21, text width=5cm] {% 34 Learn a similarity function\\ 35 \(\operatorname{sim}\colon \dataSet\times\dataSet\to\symbb{R}\) 36 37 \bigskip 38 39 \(\operatorname{sim}(\textcolor{Dark2-B}{x_1}, \textcolor{Dark2-A}{x_2}) < \operatorname{sim}(\textcolor{Dark2-A}{x_2}, \textcolor{Dark2-C}{x_3})\)\\ 40 \(\operatorname{sim}(\textcolor{Dark2-B}{x_1}, \textcolor{Dark2-C}{x_3}) < \operatorname{sim}(\textcolor{Dark2-A}{x_2}, \textcolor{Dark2-C}{x_3})\)\\ 41 }; 42 \end{tikzpicture} 43 44 \bigskip 45 46 5~way 1~shot: given 1 query and 5 candidates, which of the candidates is most similar to the query? 47 48 Evaluated using accuracy. 49 \end{frame}